SA-MP Forums Archive
Auto kick=FAIL - 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: Auto kick=FAIL (/showthread.php?tid=331743)



Auto kick=FAIL - dannyk0ed - 05.04.2012

I have a AUTO kick code
pawn Код:
new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
    new namestring = strfind(plname, "_", true);
    if(namestring == -1)
    {
        SendClientMessage(playerid, COLOR_YELLOW2, "Los Santos CityHall: Your name is not Valid.");
        SendClientMessage(playerid, COLOR_GROVE, "Hint: Your name must be in the format Like First_Last.");
        Kick(playerid);
                return 1;  
    }
When i use Danny_Kovalchuk it still kicks me


Re: Auto kick=FAIL - ViniBorn - 05.04.2012

pawn Код:
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
if(strfind(plname, "_", true) == -1)
{
    SendClientMessage(playerid, COLOR_YELLOW2, "Los Santos CityHall: Your name is not Valid.");
    SendClientMessage(playerid, COLOR_GROVE, "Hint: Your name must be in the format Like First_Last.");
    Kick(playerid);
}



Re: Auto kick=FAIL - dannyk0ed - 05.04.2012

Still Kicks me


Re: Auto kick=FAIL - ViniBorn - 05.04.2012

strfind
Код:
Returns	The number of characters before the sub string (the sub string's start position) or -1 if it's not found.
This code is correct. The problem must be in another...


Re: Auto kick=FAIL - dannyk0ed - 05.04.2012

I understand, i fixed it