Squirrel/Functions/Server/SetDrivebyEnabled
From VC-MP Wiki
This functions toggles the drive-by sync.
Syntax
bool SetDrivebyEnabled( bool enabled )
Arguments
- true - Enables Drive-by sync.
- false - Disables Drive-by sync.
Example
If someone types '/c dbon' it will enable the Drive-by and Rockets in Hunter sync. If someone types '/c dboff' it will disable the Drive-by Rockets in Hunter sync.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "dbon" ) { SetDrivebyEnabled( true ); } }
or
function onPlayerCommand( player, cmd, text ) { if ( cmd == "dboff" ) { SetDrivebyEnabled( false ); } }
Notes
The call onPlayerCommand was used in in this example. More info about it on its page.
Related Functions
- GetServerName
- SetServerName
- GetGamemodeName
- SetGamemodeName
- GetMapName
- SetMapName
- GetPassword
- SetPassword
- GetMaxPlayers
- SetMaxPlayers
- GetPlayers
- GetDeathmatchScoreBoard
- SetDeathmatchScoreBoard
- GetDeathMessages
- SetDeathMessages
- GetDrivebyEnabled
- SetDrivebyEnabled
- GetFallEnabled
- SetFallEnabled
- GetDriveOnWater
- SetDriveOnWater
- GetFlyingCars
- SetFlyingCars
- GetTaxiBoostJump
- SetTaxiBoostJump
- SetWeaponDamage
- GetSkinEnabledForPlayer
- SetSkinEnabledForPlayer
