NPC ID
#3

When you start the server the NPC is the first that connect in it, so if you added only one NPC, the ID of this will be ID 0.

I did a command that can help you:


pawn Код:
if(strcmp("/npcinfo", cmdtext, true, 7) == 0)
    {
        new string[128];
        new name[MAX_PLAYER_NAME];
        SendClientMessage(playerid, 0x33AA33AA, "NPC Information:");
        for(new x = 0; x < MAX_PLAYERS; x++)
        {
            if(IsPlayerNPC(x))
            {
                GetPlayerName(x, name, sizeof(name));
                format(string, sizeof(string), "Name: %s.  ID: %d", name, x);
                SendClientMessage(playerid, 0xFFFF00AA, string);
            }
        }
        return 1;
    }

I hope that i have helped
Reply


Messages In This Thread
NPC ID - by BlueKenny - 20.12.2010, 10:33
Re: NPC ID - by TopAz07 - 20.12.2010, 10:46
Re: NPC ID - by rjjj - 20.12.2010, 10:54
Re: NPC ID - by Rachael - 20.12.2010, 10:56
AW: NPC ID - by BlueKenny - 20.12.2010, 12:13

Forum Jump:


Users browsing this thread: 2 Guest(s)