Counter Strike Online Wiki
Advertisement

This module contains functionality for scripts running on the client.

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

Functions[]

ScreenSize ()[]

Get the size of the screen.
Returns:
(size) size

Signal (signal)[]

Send a random signal to the server.
When a signal is received, a Game.Rule.OnPlayerSignal event is raised.
Parameters:
  • signal: (int) Any integer value

StopPlayerControl (stop)[]

Movement and attacks are prohibited for a certain period of time.
It is reset when the player dies. It is possible from 0 to 60 seconds.
Parameters:
  • stop: (bool) The Status suspended

PlayerIndex (index)[]

Get the player's index number. Same as Game.Entity.index.
Parameters:
  • index: (int) player index

GetTime ()[]

Get the current game time.
Same as the arguments of UI.Event.OnUpdate.
Returns:
(number) Current game time

Tables[]

Size[]

Data type indicating the size of the screen
Fields:
  • width: (int) width
  • height: (int) height

KEY[]

Keyboard and mouse input
Fields:
  • NUM1: 1 key
  • NUM2: 2 key
  • NUM3: 3 key
  • NUM4: 4 key
  • NUM5: 5 key
  • NUM6: 6 key
  • NUM7: 7 key
  • NUM8: 8 key
  • NUM9: 9 key
  • NUM0: 0 key
  • A: A key
  • B: B key
  • C: C key
  • D: D key
  • E: E key
  • F: F key
  • G: G key
  • H: H key
  • I: I key
  • J: J key
  • K: K key
  • L: L key
  • M: M key
  • N: N key
  • O: O key
  • P: P key
  • Q: Q key
  • R: R key
  • S: S key
  • T: T key
  • U: U key
  • V: V key
  • W: W key
  • X: X key
  • Y: Y key
  • Z: Z key
  • SHIFT: Shift
  • SPACE: Spacebar
  • ENTER: Enter
  • UP: Up arrow
  • DOWN: Down arrow
  • LEFT: Left arrow
  • RIGHT: Right arrow
  • MOUSE1: Left mouse button
  • MOUSE2: Right mouse button

Class[]

SyncValue[]

Synchronization variable
  • SyncValue: (UI.SyncValue)

Event[]

Event
  • Event: (UI.Event)

Text[]

Text UI
  • Text: (UI.Text)

Box[]

Box UI
  • Box: (UI.Box)

Advertisement