PedSetThrottle
This function was added in DSL 7
Description
Set a ped's current throttle value.
Only has an effect if using during a PedUpdateThrottle
event.
function PedSetThrottle(ped, throttle) --[[ ... ]] end
Parameters
ped
:integer
- The ped to set the throttle value for.throttle
:number
- The throttle value to set, ranging from 0.0 (no throttle) to 1.5 (full throttle).
Return Values
None.
Example
local target = PedGetTargetPed(gPlayer)
local randomThrottle = math.random() * 1.5
PedSetThrottle(target, randomThrottle)
See Also
- Game's Native
- DSL