Scripting/Squirrel/Functions/SetServerPassword: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function will set the server password. == Syntax == <pre>SetServerPassword( password )</pre> == Arguments == * ''string'' '''password''' - The password to set == Exa...") |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
== Syntax == | == Syntax == | ||
<pre> | <pre>SetPassword( password )</pre> | ||
== Arguments == | == Arguments == | ||
Line 9: | Line 9: | ||
* ''string'' '''password''' - The password to set | * ''string'' '''password''' - The password to set | ||
This command will change the server password when a player types '/setpass anystring'. | |||
{{ | <source lang="squirrel"> | ||
function onPlayerCommand( player, cmd, text ) | |||
{ | |||
if ( cmd == "setpass" ) | |||
{ | |||
SetPassword( text ); | |||
} | |||
} | |||
</source> | |||
=== Notes === | === Notes === | ||
The call [[Scripting/Squirrel/Events/Player/onPlayerCommand|onPlayerCommand]] was also used in the example. More info about this in the corresponding page. | |||
== Related Functions == | == Related Functions == | ||
{{Scripting/Squirrel/Functions/Server_Settings}} | {{Scripting/Squirrel/Functions/Server_Settings}} | ||
[[Category:Scripting/Squirrel/Functions/Server_Settings _Functions]] |
Latest revision as of 21:49, 30 January 2017
This function will set the server password.
Syntax
SetPassword( password )
Arguments
- string password - The password to set
This command will change the server password when a player types '/setpass anystring'.
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
- GetDeathmatchScoreboard
- GetDeathMessages
- GetDrivebyEnabled
- GetDriveOnWater
- GetFallEnabled
- GetFastSwitch
- GetFlyingCars
- GetFrameLimiter
- GetFriendlyFire
- GetGameModeName
- GetGamespeed
- GetGravity
- GetHour
- GetJoinMessages
- GetJumpSwitch
- GetKillDelay
- GetMaxHeight
- GetMaxPlayers
- GetMinute
- GetObjectCount
- GetPerfectHandling
- GetPickupCount
- GetPlayers
- GetServerName
- GetPassword
- GetShootInAir
- GetShowNametags
- GetShowOnlyTeamMarkers
- GetShowOnRadar
- GetSkinID
- GetStuntBike
- GetSyncFrameLimiter
- GetTaxiBoostJump
- GetTickCount
- GetTimeRate
- GetVehicleCount
- GetVehiclesForcedRespawnHeight
- GetWallglitch
- GetWaterLevel
- GetWeaponSync
- GetWeather
- ReloadScripts
- SetDeathmatchScoreboard
- SetDeathMessages
- SetDrivebyEnabled
- SetDriveOnWater
- SetFallEnabled
- SetFastSwitch
- SetFlyingCars
- SetFrameLimiter
- SetFriendlyFire
- SetGameModeName
- SetGamespeed
- SetGravity
- SetHour
- SetJoinMessages
- SetJumpSwitch
- SetKillDelay
- SetMaxHeight
- SetMaxPlayers
- SetMinute
- SetPerfectHandling
- SetServerName
- SetPassword
- SetShootInAir
- SetShowNametags
- SetShowOnlyTeamMarkers
- SetShowOnRadar
- SetStuntBike
- SetSyncFrameLimiter
- SetTaxiBoostJump
- SetTimeRate
- SetTime
- SetVehiclesForcedRespawnHeight
- SetWallglitch
- SetWaterLevel
- SetWeaponSync
- ShutdownServer