Counter Strike Online Wiki
Advertisement

Variables automatically synchronized with the server


Fields[]

UI.SyncValue.name[]

Get the name of the SyncValue.


UI.SyncValue.value[]

Get the value of SyncValue.
  • value: (number, string or bool)
Usage:
var1 = UI.SyncValue.Create('var1')
print(var1.value)


Methods[]

UI.SyncValue:Create (name)[]

Create a UI.SyncValue with a specific name or get a UI.SyncValue with the same name.
It is synchronized with Game.SyncValue of the same name.
Parameters:
Returns:
(UI.SyncValue)
Usage:
var1 = UI.SyncValue.Create('var1')


Event Callback[]

UI.SyncValue: OnSync ()[]

Event callback that is called when SyncValue is synchronized.
Usage:
var1 = UI.SyncValue.Create('var1')
function var1:OnSync()
    print(self.value .. ' is synced!')
end
Advertisement