diff --git a/scripts/client/npc.js b/scripts/client/npc.js new file mode 100644 index 00000000..5d823bf6 --- /dev/null +++ b/scripts/client/npc.js @@ -0,0 +1,19 @@ +// =========================================================================== +// Vortrex's Roleplay Resource +// https://github.com/VortrexFTW/gtac_roleplay +// =========================================================================== +// FILE: npc.js +// DESC: Provides NPC functions and processing +// TYPE: Client (JavaScript) +// =========================================================================== + +function processNPCMovement(npc) { + //if(npc.isSyncer == true) { + if(getEntityData(npc, "vrr.lookAtClosestPlayer") == true) { + let closestPlayer = getClosestPlayer(getElementPosition(npc.id)); + setPedLookAt(npc, getElementPosition(closestPlayer.id)); + } + //} +} + +// =========================================================================== \ No newline at end of file