Files
GTA4RP/scripts/client/npc.js
2022-05-22 13:30:19 -05:00

19 lines
754 B
JavaScript

// ===========================================================================
// 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));
}
//}
}
// ===========================================================================