ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setPedGravity

Function

setPedGravity

ServerPedsIdentical to MTA:SA

Stores the gravity of a single ped (0.008 by default, the same as world gravity). In Trilogy Hub this is state for scripts returned by getPedGravity; only the whole world's gravity set with setGravity affects how peds move.

Syntax

bool setPedGravity(ped ped, float value)

Arguments

pedped
A player or an NPC.
valuefloat
Gravity (0.008 = normal).

Returns

true on success.

Example

setPedGravity(player, 0.004)

Notes

State for scripts. Gravity that works in the game is changed with setGravity.

See also