setPedAsCop
SET_PED_AS_COP0xBB03C38DD3FB7FFDThe GTA V native SET_PED_AS_COP of the PED namespace, as LS:MP client scripts call it: the global function setPedAsCop, in JavaScript and in Lua.
setPedAsCop(ped: Ped, toggle: boolean): voidsetPedAsCop(ped: Ped, toggle: boolean)Usage
JavaScript
setPedAsCop(ped, toggle);Lua
setPedAsCop(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.
Turns the desired ped into a cop. If you use this on the player ped, you will become almost invisible to cops dispatched for you. You will also report your own crimes, get a generic cop voice, get a cop-vision-cone on the radar, and you will be unable to shoot at other cops. SWAT and Army will still shoot at you. Toggling ped as "false" has no effect; you must change p0's ped model to disable the effect.
Reference
- Namespace
- Ped PED
- In the game
void SET_PED_AS_COP(Ped ped, BOOL toggle)- Hash
0xBB03C38DD3FB7FFD