Personal tools


From JC2-MP Documentation

< Lua‎ | Shared
Jump to: navigation, search


SharedObject is an object storage, useful for sharing data with other modules.

If created on server – only accessible to server modules. Likewise with client.

Can be used to keep data between module reloads, as it is not automatically removed on module unload.

If you need to keep data synced with all players, see NetworkObject.

Static functions

Returns Prototype
SharedObject Create(string, table)
SharedObject Create(string)
SharedObject GetByName(string)


Returns Prototype
number GetId()
string GetName()
object GetValue(string, object)
object GetValue(string)
table GetValues()
SetValue(string, object)