SetGravity: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Replaced player with ped. Also setPlayerGravity with setPedGravity.)
m (Affects also vehicles?)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
This function sets the server's gravity level. '''Note''' that this does not effect peds/players and their vehicles; to set ped/player gravity use [[setPedGravity]].
This function sets the server's gravity level.
 
'''Note''' that this does not effect peds/players; to set ped/player gravity use [[setPedGravity]].


==Syntax==
==Syntax==

Revision as of 13:07, 14 September 2009

This function sets the server's gravity level.

Note that this does not effect peds/players; to set ped/player gravity use setPedGravity.

Syntax

setGravity ( float level )

Required Arguments

  • level: The level of gravity ( default is 0.008 )

Example

function grav ( sourcePlayer, command, level )
    setGravity ( tonumber(level) )
end
addCommandHandler ( "setgravity", grav )

See Also