Counter Strike Online Wiki
Advertisement

This module contains functions for scripts running on the server.

It can be used in the script file registered in the game array of project.json.   

Functions[]

FindPlayerAt (position)[]

Find the player located at a specific coordinate.
Parameters:
  • position: (position)
Returns:
(Game.Player or nil) If there is no player at that coordinate, nil

GetTime ()[]

Get the current game time.
Same as the parameters of Game.Rule.OnUpdate.
Returns:
(number) Current game time

SetTrigger (name, value)[]

Activate the script trigger block.
Parameters:
  • name: (string) name
  • value: (bool) on/off

GetEntity (index)[]

Get the script-generated entity.
Parameters:
  • index: (int) Entity index
Returns:
(Game.Entity or nil) If there is no entity at that index, nil

RandomInt (min, max)[]

Get a random integer
Parameters:
  • min: (int) minimum
  • max: (int) maximum
Returns:
(int)

RandomFloat (min, max)[]

Get random mistakes
Parameters:
  • min: (number) min
  • max: (number) maximum
Returns:
(number)

GetTriggerEntity ()[]

Gets the player or monster entity that affected the script call block to execute.
It can be used only in functions executed through the script call block.
Returns:
(Game.Entity or nil) if the Zune player or monster impact nil

GetScriptCaller ()[]

Get the script call block that called the currently executing function.
It can be used only in functions executed through the script call block.
Returns:
(Game.EntityBlock or nil) if not executed through the script call block, nil

KillAllMonsters ()[]

Kill all monsters after the next OnUpdate

Tables[]

Team[]

All teams
Fields:
  • UNASSIGNED: In preparation
  • TR: Terrorist
  • CT: Counterterrorist
  • SPECTATOR: Spectators

Model[]

Player model
Fields:
  • DEFAULT: Class selected when entering
  • SEAL: Seal Team 6
  • GSG9: GSG9
  • GIGN: GIGN
  • SAS: SAS
  • SPETSNAZ: Spetsnaz
  • GUERILLA: Guerrilla
  • PHOENIX: Phoenix Connection
  • ELITE: Elite Agent
  • ARCTIC: Arctic Avengers
  • MILITIA: Militia
  • Hero: Hero
  • HEROINE: Heroine
  • NORMAL_ZOMBIE: Normal Zombie
  • LIGHT_ZOMBIE: Light zombie
  • HEAVY_ZOMBIE: Heavy Zombie
  • PHYCHO_ZOMBIE: Psycho Zombie
  • VOODOO_ZOMBIE: Voodoo Zombies
  • DEIMOS_ZOMBIE: Deimos
  • GANYMEDE_ZOMBIE: Ganymede
  • STAMPER_ZOMBIE: Stamper
  • BANSHEE_ZOMBIE: Banshee
  • VENOMGUARD_ZOMBIE: Venom Guard
  • STINGFINGER_ZOMBIE: Sting Finger
  • METATRON_ZOMBIE: Metatron
  • LILITH_ZOMBIE: Lilith
  • CHASER_ZOMBIE: Chaser
  • BLOTTER_ZOMBIE: Blotter
  • RUSTYWING_ZOMBIE: Rusty Wing
  • AKSHA_ZOMBIE: Aksha
  • NORMAL_ZOMBIE_HOST: Normal zombie (Host)
  • LIGHT_ZOMBIE_HOST: Light Zombie (Host)
  • HEAVY_ZOMBIE_HOST: Heavy Zombie (Host)
  • PHYCHO_ZOMBIE_HOST: Psycho Zombie (Host)
  • VOODOO_ZOMBIE_HOST: Voodoo Zombie (Host)
  • DEIMOS_ZOMBIE_HOST: Deimos (Host)
  • GANYMEDE_ZOMBIE_HOST: Ganymede (Host)
  • STAMPER_ZOMBIE_HOST: Stamper (Host)
  • BANSHEE_ZOMBIE_HOST: Banshee (Host)
  • VENOMGUARD_ZOMBIE_HOST: Venom Guard (Host)
  • STINGFINGER_ZOMBIE_HOST: Sting Finger (Host)
  • METATRON_ZOMBIE_HOST: Metatron (Host)
  • LILITH_ZOMBIE_HOST: Lilith (Host)
  • CHASER_ZOMBIE_HOST: Chaser (Host)
  • BLOTTER_ZOMBIE_HOST: Blotter (Host)
  • RUSTYWING_ZOMBIE_HOST: Rusty Wing (Host)
  • AKSHA_ZOMBIE_HOST: Aksha (Host)

WeaponType[]

Weapon Types
Fields:
  • NONE: Unknown
  • KNIFE: Melee Weapons
  • PISTOL: Pistol
  • GRENADE: Grenade
  • SUBMACHINEGUN: Submachine Gun
  • SHOTGUN: Shotgun
  • MACHINEGUN: Machine gun
  • RIFLE: Rifle
  • SNIPERRIFLE: Sniper rifle
  • EQUIPMENT: Equipment

Hitbox[]

Player hitbox area
Fields:
  • HEAD: Head
  • CHEST: Chest
  • STOMACH: Stomach
  • LEFTARM: Left Arm
  • RIGHTARM: Right Arm
  • LEFTLEG: Left Leg
  • RIGHTLEG: Right Leg

EntityType[]

Entity type
Fields:
  • ENTITY: Basic Entity
  • MONSTER: Monster
  • PLAYER: Player

MonsterType[]

Monster types
Fields:
  • NORMAL0: Normal Zombie LV.0
  • NORMAL1: Normal zombie LV.1
  • NORMAL2: Normal Zombies LV.2
  • NORMAL3: Normal Zombies LV.3
  • NORMAL4: Normal Zombies LV.4
  • NORMAL5: Normal Zombie LV.5
  • NORMAL6: Normal Zombie LV.6
  • RUNNER0: Runner Zombie LV.0
  • RUNNER1: Runner Zombie LV.1
  • RUNNER2: Runner Zombie LV.2
  • RUNNER3: Runner Zombie LV.3
  • RUNNER4: Runner Zombie LV.4
  • RUNNER5: Runner Zombie LV.5
  • RUNNER6: Runner Zombie LV.6
  • HEAVY1: Heavy Armored Zombie LV.1
  • HEAVY2: Heavy Glove Zombie LV.2
  • GHOST: Ghost
  • PUMPKIN: Pumpkin head Scarecrow
  • PUMPKINHEAD: Pumpkin Head
  • A101AR: A101AR
  • A104RL: A104RL

RenderFX[]

Type of effect when drawing ENTITY
Fields:
  • NONE: No effect
  • GLOWSHELL: Shiny surface

WeaponColor[]

Applied to the effect color when the weapon is dropped and the color of the weapon inventory
Fields:
  • NONE: No color
  • GREEN: Green
  • WHITE: White
  • RED: Red
  • BLUE: Blue
  • YELLOW: Yellow
  • ORANGE: Orange

ThirdPerson_Fixed_Plane[]

Based on ThirdPersonFixedView, the mouse pointer's raycast position is calculated.
The default is GROUND.
Fields:
  • GROUND: XY plane, raycast based on various objects, player position
  • XY: XY plane, raycast based on player position
  • XZ: XZ plane, raycast based on player position
  • YZ: YZ plane, raycast based on player position

Position[]

Data type representing specific block coordinates
Fields:
  • x: (int) x coordinate
  • y: (int) y coordinate
  • z: (int) z coordinate

Class[]

SyncValue[]

Synchronization variable
  • SyncValue: (Game.SyncValue)

Rule[]

Game rules
  • Rule: (Game.Rule)

Entity[]

Entity
  • Entity: (Game.Entity)

Player[]

Game player
  • Player: (Game.Player)

Monster[]

Monster
  • Monster: (Game.Monster)

EntityBlock[]

Device block
  • EntityBlock: (Game.EntityBlock)

Weapon[]

Weapon
  • Weapon: (Game.Weapon)

Advertisement