Files
GTA4RP/scripts/client/npc.js
2022-06-30 18:29:00 -05:00

19 lines
752 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, "agrp.lookAtClosestPlayer") == true) {
let closestPlayer = getClosestPlayer(getElementPosition(npc.id));
setPedLookAt(npc, getElementPosition(closestPlayer.id));
}
//}
}
// ===========================================================================