how to get fnpc name? - 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)
+--- Thread: how to get fnpc name? (
/showthread.php?tid=654082)
how to get fnpc name? -
parames3010 - 20.05.2018
Example i created 2 npc
Zm[Aiid][0] = FCNPC_Create("
Npcfisher1");
Zm[Aiid][1] = FCNPC_Create("
Npcfisher2");
how can i get name FCNPC Npcfisher1 and Npcfisher2 ?
if(
i want check name Npcfisher1 here )
{
//////
}
else if(
i want check name Npcfisher2 here )
{
//////
}
Please help
Re: how to get fnpc name? -
CyNiC - 20.05.2018
Save the name in some var.
pawn Code:
enum npcs_info
{
id,
name[30]
};
new Zm[MAX_PLAYERS][npcs_info];
Zm[Aiid][id] = FCNPC_Create("Npcfisher1");
format(Zm[Aiid][name], 30, "Npcfisher1");
if(!strcmp("name","Zm[Aiid][name])) //names equals
{
}
else //...