Squirrel/Functions/Server/SetMaxPlayers
From VC-MP Wiki
Changes the maximum players limit of the server.
Syntax
bool SetMaxPlayers( int limit )
Arguments
- limit - The number of players allowed to join you want to set
Example
This example will change the server player limit when a player types '/c setlimit 20'
function onPlayerCommand( player, cmd, text ) { if ( cmd == "setlimit" ) { SetMaxPlayers( text.tointeger() ); } }
Notes
The call onPlayerCommand was also used in the example. More info about this in the corresponding 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
