How can i get the npc id? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How can i get the npc id? (
/showthread.php?tid=143474)
How can i get the npc id? -
Ben147 - 23.04.2010
if my my npc name is Jack how can i get the npc id?
Re: How can i get the npc id? -
mick88 - 23.04.2010
In game or in code? In code the same way you get player id. In game try /rcon players
Re: How can i get the npc id? -
[HiC]TheKiller - 23.04.2010
[PAWN]
new Pname[24];
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerNPC(i) && !strcmp(GetPlayerName(i, Pname, 24), "Jack")
{
return i;
}
return -1;
}
Re: How can i get the npc id? -
Ben147 - 23.04.2010
I did something else but thanks