isPedDucked
Shared
Tells whether a ped or player is crouching.
bool isPedDucked(ped ped)
Parameters
| Name | Type | Description |
|---|---|---|
| ped | ped | The ped or player. |
Returns
true if it is crouching, false if not or if there is no state to read.
On the server, the value is the last one sent by the client that syncs the ped.
Example
addEventHandler("onClientRender", root, function()
if isPedDucked(localPlayer) then
dxDrawText("Crouching", 20, 300)
end
end)