Posts: 262
Threads: 73
Joined: Jul 2009
Reputation:
0
if my my npc name is Jack how can i get the npc id?
Posts: 166
Threads: 16
Joined: Jan 2010
Reputation:
0
In game or in code? In code the same way you get player id. In game try /rcon players
Posts: 2,629
Threads: 40
Joined: Mar 2008
Reputation:
0
[PAWN]
new Pname[24];
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerNPC(i) && !strcmp(GetPlayerName(i, Pname, 24), "Jack")
{
return i;
}
return -1;
}