20.12.2010, 10:54
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:
I hope that i have helped
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