Process NPC movement
This commit is contained in:
19
scripts/client/npc.js
Normal file
19
scripts/client/npc.js
Normal file
@@ -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));
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user