Squirrel/Functions/Server/GetDrivebyEnabled

From VC-MP Wiki

Jump to: navigation, search

This returns wether or not drivebys are enabled

Syntax

bool GetDrivebyEnabled()

Arguments

  • None

Example

This example tells the player whether the server has drive-by sync enabled when they type '/c driveby'.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "driveby" )
     {
          if ( GetDrivebyEnabled() ) MessagePlayer( "This server has enabled Drive-by.", player );
          else MessagePlayer( "This server has disabled Drive-by.", player );
     }
}

Notes

The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in the corresponding pages.

Related Functions

squirrel scripting