09.11.2013, 10:15
Hi, I made a timer witch each 4 sec it spawns a zombie (within a callback) :
I'm using RNPC include/plugin
The problem is : the npc is created but can't see npc in my pos...
pawn Код:
//Sorry about the identation when I copy a code here ...
public OnPlayerSpawn(playerid)
{
new target;
if(IsPlayerNPC(playerid))// if the player is NPC do nothing
{
}
else
{
ZBT[playerid] = SetTimerEx("ZombieBot", 4000, true, "ii", playerid, target);
}
return 1;
}
pawn Код:
forward ZombieBot(playerid, target);
public ZombieBot(playerid, target)
{
CreateRNPC("ZOMBIE");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);
SetRNPCPos(target,x+6.0,y,z);
SendClientMessage(playerid,COLOR_WHITE,"It is in your pos !");
return 1;
}
The problem is : the npc is created but can't see npc in my pos...