Squirrel/Functions/Server/SetPassword
From VC-MP Wiki
This will change the password required to connect the server and lock the server, or unlock if no parameters/a null parameter is given.
Syntax
bool SetPassword( string pass )
Arguments
- pass - The new password needed to join the server
Example
This command will change the server password when a player types '/c setpass ubersecret'.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "setpass" ) { SetPassword( text ); } }
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
