SA-MP Forums Archive
NPCs disconnect within 15 seconds of connecting [SOLVED] - 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: NPCs disconnect within 15 seconds of connecting [SOLVED] (/showthread.php?tid=340714)



NPCs disconnect within 15 seconds of connecting [SOLVED] - Deal-or-die - 08.05.2012

Nevermind fixed -.- Just realised i had 'return 1;' FML... -.-

NPCs Connect but disconnect within 15 seconds of connecting
I have added if(IsPlayerNPC(playerid)) return 1; to the following

pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
pawn Код:
case 1: //Login
        {
            if(IsPlayerNPC(playerid)) return 1;
            if(!response) KickEx(playerid,999, "Cancelled login process");
            else
            {
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
            if(!response) KickEx(playerid,999, "Cancelled registration process");
            else
            {
pawn Код:
case 6: // Beginning of registration process
        {
            if(IsPlayerNPC(playerid)) return 1;
            if(!response) KickEx(playerid,999, "Cancelled registration process");
            else
And so on but still, connects and leaves...