PedClient

givePedNmMessage

GIVE_PED_NM_MESSAGE0xB158DFCCC56E5C5B

The GTA V native GIVE_PED_NM_MESSAGE of the PED namespace, as LS:MP client scripts call it: the global function givePedNmMessage, in JavaScript and in Lua.

SignatureJavaScript
givePedNmMessage(ped: Ped): void
SignatureLua
givePedNmMessage(ped: Ped)

Usage

JavaScript
givePedNmMessage(ped);
Lua
givePedNmMessage(ped)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

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.

Sends the message that was created by a call to createNmMessage to the specified Ped.

If a message hasn't been created already, this function does nothing.
If the Ped is not ragdolled with Euphoria enabled, this function does nothing.
The following call can be used to ragdoll the Ped with Euphoria enabled: setPedToRagdoll(ped, 4000, 5000, 1, 1, 1, 0);

Call order:
setPedToRagdoll
createNmMessage
givePedNmMessage

Multiple messages can be chained. Eg. to make the ped stagger and swing his arms around, the following calls can be made:

setPedToRagdoll(ped, 4000, 5000, 1, 1, 1, 0);
createNmMessage(true, 0); // stopAllBehaviours - Stop all other behaviours, in case the Ped is already doing some Euphoria stuff.
givePedNmMessage(ped); // Dispatch message to Ped.
createNmMessage(true, 1151); // staggerFall - Attempt to walk while falling.
givePedNmMessage(ped); // Dispatch message to Ped.
createNmMessage(true, 372); // armsWindmill - Swing arms around.
givePedNmMessage(ped); // Dispatch message to Ped.

Reference

Namespace
Ped PED
In the game
void GIVE_PED_NM_MESSAGE(Ped ped)
Hash
0xB158DFCCC56E5C5B

Open in the interactive natives reference