Scripting/Squirrel/Functions/SetGravity: 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 gravity of the game. == Syntax == <pre>SetGravity( gravity )</pre> == Arguments == * ''float'' '''gravity'''' - The gravity of the game (default...") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
== Arguments == | == Arguments == | ||
* ''float'' '''gravity | * ''float'' '''gravity''' - The gravity of the game (default is 0.008) | ||
== Example == | == Example == | ||
<source lang=squirrel> | |||
{{ | else if ( cmd == "setgravity" ) | ||
{ | |||
if ( !text ) MessagePlayer( "Use /setgravity <Gravity>.", player ); | |||
else if ( !IsNum( text ) ) MessagePlayer( "Gravity must be an integer.", player ); | |||
else { | |||
SetGravity(text.tointeger()) | |||
MessagePlayer( "Game gravity has been changed." , player ); | |||
} | |||
} | |||
</source> | |||
=== Notes === | === Notes === | ||
== 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 08:37, 26 April 2019
This function will set the gravity of the game.
Syntax
SetGravity( gravity )
Arguments
- float gravity - The gravity of the game (default is 0.008)
Example
else if ( cmd == "setgravity" )
{
if ( !text ) MessagePlayer( "Use /setgravity <Gravity>.", player );
else if ( !IsNum( text ) ) MessagePlayer( "Gravity must be an integer.", player );
else {
SetGravity(text.tointeger())
MessagePlayer( "Game gravity 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