natives.setBlockingOfNonTemporaryEvents

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.setBlockingOfNonTemporaryEvents(int ped, bool toggle)

The natives.setBlockingOfNonTemporaryEvents function is used to Prevents the ped from reacting to non-temporary events such as fleeing, fighting, or ambient AI behaviors. Commonly used before forcing a ped into a scripted animation.

Parameters

1) int ped The ped handle.
2) bool toggle True to block non-temporary events, false to allow them.

Return

void This function doesn't return a value.

Notes

Examples

Example 1 - JavaScript:

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

       natives.setBlockingOfNonTemporaryEvents(ped, true);
   }

});

Compatibility

There isn't any compatibility information for this function.

Related

Client Related

        addEvent
        addEventHandler
        bindEventHandler
        removeEventHandler
        triggerEvent
        triggerNetworkEvent
        unbindEventHandler