Squirrel/Functions/Server/GetPassword
From VC-MP Wiki
This returns the password needed to join the server, or 'none' if no password has been set.
Syntax
string GetPassword()
Arguments
- None
Example
This command will return the server password when someone types '/c serverpass'.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "serverpass" ) { MessagePlayer( "Server password is: " + GetPassword(), player ); } }
Notes
The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.
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
