NPCData is supposed to accept ped, not int
This commit is contained in:
@@ -17,11 +17,14 @@ function initNPCScript() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} npcId - The data index of the NPC
|
* @param {Ped} ped - The data index of the NPC
|
||||||
* @return {NPCData} The NPC's data (class instancee)
|
* @return {NPCData} The NPC's data (class instancee)
|
||||||
*/
|
*/
|
||||||
function getNPCData(npcId) {
|
function getNPCData(ped) {
|
||||||
return ped.getData("vrr.dataIndex");
|
if(ped.getData("vrr.dataIndex")) {
|
||||||
|
return ped.getData("vrr.dataIndex");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user