setPlayerLockon
SET_PLAYER_LOCKON0x5C8B2F450EE4328EThe GTA V native SET_PLAYER_LOCKON of the PLAYER namespace, as LS:MP client scripts call it: the global function setPlayerLockon, in JavaScript and in Lua.
setPlayerLockon(player: Player, toggle: boolean): voidsetPlayerLockon(player: Player, toggle: boolean)Usage
JavaScript
setPlayerLockon(player, toggle);Lua
setPlayerLockon(player, toggle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | 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.
Example from fm_mission_controler.ysc.c4:
setPlayerLockon(playerId(), 1);All other decompiled scripts using this seem to be using the player id as the first parameter, so I feel the need to confirm it as so.
No need to confirm it says playerId() so it uses playerId() lol.
Reference
- Namespace
- Player PLAYER
- In the game
void SET_PLAYER_LOCKON(Player player, BOOL toggle)- Hash
0x5C8B2F450EE4328E