Set NPc pos.
#6

This is just a guess, but maybe it works when you use a stock function, I've made this real quickly.
pawn Code:
stock GetNPCID(name[])
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerNPC(i))
        {
            new npcname[MAX_PLAYER_NAME];
            GetPlayerName(i,npcname,MAX_PLAYER_NAME);
            if(strcmp(name,npcname,true) == 0)
            {
            return i;
            }
        }
    }
}
Send the NPC's name to this function, and you'll get the id (not tested).

It would be like
pawn Code:
new npcid = GetNPCID("Zombie");
SetPlayerPos(npcid,x,y,z);
It should work.
Reply


Messages In This Thread
Set NPc pos. - by [D]ry[D]esert - 18.03.2013, 17:22
Re: Set NPc pos. - by mastermax7777 - 18.03.2013, 17:27
Re: Set NPc pos. - by [D]ry[D]esert - 18.03.2013, 17:31
Re: Set NPc pos. - by [D]ry[D]esert - 18.03.2013, 17:46
Re: Set NPc pos. - by mastermax7777 - 18.03.2013, 17:50
Re: Set NPc pos. - by Jstylezzz - 18.03.2013, 17:52
Re: Set NPc pos. - by Misiur - 18.03.2013, 17:52

Forum Jump:


Users browsing this thread: 1 Guest(s)