SA-MP Forums Archive
FCNPC error - 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: FCNPC error (/showthread.php?tid=474142)



FCNPC error - Saw® - 06.11.2013

Hey
pawn Код:
YCMD:n(playerid, params[], help) // a test command , after I will put it in timer for my zombie bot
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z); // we get the player who put /npc position
FCNPC_Create("ZOMBIE"); // we  create the NPC
FCNPC_SetPosition(npcid,x+2.0,y,z); // teleport the NPC to player's pos
    return 1;
}
I get error :
Код:
C:\DOCUME~1\ADMINI~1\Bureau\FCINFE~1\GAMEMO~1\FCI.pwn(432) : error 017: undefined symbol "npcid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
what's the problem ? npcid is unknown how to know it ?
Thanks all for reading


Re: FCNPC error - iJumbo - 06.11.2013

Код:
new npcid = FCNPC_Create("ZOMBIE");



Re: FCNPC error - Saw® - 06.11.2013

O thanks a lot ! one more thing : is it normal that a NPC ping is 6 millions ? & how to hide the NPC from TAB list ? cuz it's like a bot not player ...


Re: FCNPC error - iZN - 06.11.2013

Quote:
Originally Posted by Saw®
Посмотреть сообщение
O thanks a lot ! one more thing : is it normal that a NPC ping is 6 millions ? & how to hide the NPC from TAB list ? cuz it's like a bot not player ...
I've never worked with the NPC with FCNPC, but that's awkward how come the NPCs are showing in score board? Also, 6 million pings is not valid at all, SA-MP doesn't syncs their pings.


Re: FCNPC error - Saw® - 06.11.2013

Quote:
Originally Posted by iZN
Посмотреть сообщение
I've never worked with the NPC with FCNPC, but that's awkward how come the NPCs are showing in score board? Also, 6 million pings is not valid at all, SA-MP doesn't syncs their pings.
Yea , strange that we see them in the score board, here's the command:
pawn Код:
YCMD:n(playerid, params[], help)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new npcid = FCNPC_Create("ZOMBIE");
FCNPC_Spawn(npcid,180,x,y+2.0,z);
    return 1;
}
SS:



Re: FCNPC error - Saw® - 07.11.2013

UP..


Re: FCNPC error - Pottus - 07.11.2013

It's not strange at all if you understood FCNPC or actually read through the thread you would realize the purpose is to enable OnPlayerGiveDamage() this makes the FCNPC damage system perfect. The best thing to do is set the NPC color black if you want to camouflage them in the player list. Anyways I do not recommend FCNPC at all it's not reliable for a myriad of reasons best to just stay away and use RNPC which is harder to use but will yield better results in the long run. Also keep in mind that those of us who do create NPC systems it takes a lot of effort and a lot of trouble shooting to design them.


Re: FCNPC error - Saw® - 07.11.2013

Oh thanks , u mean this one ?: https://sampforum.blast.hk/showthread.php?tid=412666

it doesn't work for me IDK why I used the GM test the NPCs don't spawn...

EDIT : it works