natives.setCharDecisionMaker

Revision as of 00:02, 4 December 2025 by ChrisGame20 (talk | contribs) (Created page with "{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.setCharDecisionMaker |parameters = int ped, int decisionMakerId |parameter1 = int ped The ped handle |parameter2 = int decisionMakerId The decision maker ID that defines the ped’s AI behavior |usage = Assigns a decision maker to a ped, which controls how the ped reacts to threats, combat, and ambient events. |notes = - Often combined with natives.createChar to spawn a ped - Typically used...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.setCharDecisionMaker(int ped, int decisionMakerId)

The natives.setCharDecisionMaker function is used to Assigns a decision maker to a ped, which controls how the ped reacts to threats, combat, and ambient events.

Parameters

1) int ped The ped handle.
2) int decisionMakerId The decision maker ID that defines the ped’s AI behavior.

Return

void This function doesn't return a value.

Notes

Examples

Example 1 - JavaScript:

addCommandHandler("setdm", function(command, params, client) {

       natives.setCharDecisionMaker(ped, 4);
   }

});

Compatibility

There isn't any compatibility information for this function.