[HELP] NPC Kick - 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: [HELP] NPC Kick (
/showthread.php?tid=553957)
[HELP] NPC Kick -
Professional_Programmer - 01.01.2015
Hello, I'm trying to kick the NPC on end of playback, but compiler says: error 017: undefined symbol "Kick".
I tried all my ideas but it doesn't worked.
Any idea how to make it work?
Thanks.
Код:
#include <a_npc>
#include <a_samp>
public OnRecordingPlaybackEnd()
{
for(new i = 0; i < MAX_PLAYERS_EX; i++)
{
new npcName[MAX_PLAYER_NAME];
GetPlayerName(i, npcName, sizeof(npcName));
if(!strcmp(npcName, "[NPC]Customer"))
{
Kick(i);
}
}
}
Re: [HELP] NPC Kick -
Professional_Programmer - 01.01.2015
Quote:
Originally Posted by ******
You can't use the "a_samp" include in NPC scripts. In fact, the includes have guards to prevent both being included - you get one or the other, whichever came first.
|
Yea, but It's not the problem. If I delete #include<a_samp>, the error is still there.
Re: [HELP] NPC Kick -
Professional_Programmer - 01.01.2015
And that's the problem... I need to kick or disconnect the NPC from server if its possible somehow.
Re: [HELP] NPC Kick -
Professional_Programmer - 03.01.2015
Nobody has any idea?