- Documentation
- Server functions
- setMapObjectSyncEnabled
Function
setMapObjectSyncEnabled
Turns synchronisation of San Andreas map objects between players on or off. On (default): when someone knocks over a hydrant or smashes a barrel, others see the same. Off: each player sees their own object state.
Syntax
bool setMapObjectSyncEnabled(bool state)Arguments
statebooltrue= sync on.
Returns
true on success.
Example
setMapObjectSyncEnabled(false)
See also
isMapObjectSyncEnabledReturns whether map object synchronisation is on.getMapObjectsReturns San Andreas map objects (hydrants, barrels, boxes, lamp posts…) that players moved or damaged. On the server each entry has a key shared by all players, model, position, rotation (quaternion), health, a broken flag and the player who last moved it. On the client it returns map objects loaded in this game with amovedfield.