setPedIsDrunk
SET_PED_IS_DRUNK0x95D2D383D5396B8AThe GTA V native SET_PED_IS_DRUNK of the AUDIO namespace, as LS:MP client scripts call it: the global function setPedIsDrunk, in JavaScript and in Lua.
setPedIsDrunk(ped: Ped, toggle: boolean): voidsetPedIsDrunk(ped: Ped, toggle: boolean)Usage
JavaScript
setPedIsDrunk(ped, toggle);Lua
setPedIsDrunk(ped, toggle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
toggle | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Sets the ped drunk sounds. Only works with playerPedId
As mentioned above, this only sets the drunk sound to ped/player.
To give the Ped a drunk effect with drunk walking animation try using setPedMovementClipset
Below is an example
if (!Function.Call<bool>(Hash.HAS_ANIM_SET_LOADED, "move_m@drunk@verydrunk"))
{
Function.Call(Hash.REQUEST_ANIM_SET, "move_m@drunk@verydrunk");
}
Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET, Ped.Handle, "move_m@drunk@verydrunk", 0x3E800000);And to stop the effect useresetPedMovementClipset
Reference
- Namespace
- Audio AUDIO
- In the game
void SET_PED_IS_DRUNK(Ped ped, BOOL toggle)- Hash
0x95D2D383D5396B8A