Scripting/Squirrel/Functions/SetWaterLevel: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary |
|||
Line 10: | Line 10: | ||
== Example == | == Example == | ||
<source lang=squirrel> | |||
{{ | else if ( cmd == "waterlevel" ) | ||
{ | |||
if ( !text ) MessagePlayer( "Use /waterlevel <Water Level>", player ); | |||
else if ( !IsNum( text ) ) MessagePlayer( "Water level must be an integer.", player ); | |||
else { | |||
SetWaterLevel(text.tointeger()) | |||
MessagePlayer( "Water level has been changed." , player ); | |||
} | |||
} | |||
</source> | |||
=== Notes === | === Notes === | ||
== Related Functions == | == Related Functions == |
Latest revision as of 08:30, 26 April 2019
This function will set the water level of the game.
Syntax
SetWaterLevel( waterlevel )
Arguments
- float waterlevel' - The water level of the game (default is 6)
Example
else if ( cmd == "waterlevel" )
{
if ( !text ) MessagePlayer( "Use /waterlevel <Water Level>", player );
else if ( !IsNum( text ) ) MessagePlayer( "Water level must be an integer.", player );
else {
SetWaterLevel(text.tointeger())
MessagePlayer( "Water level has been changed." , player );
}
}
Notes
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