Auto kick=FAIL
#1

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
Reply
#2

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);
}
Reply
#3

Still Kicks me
Reply
#4

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...
Reply
#5

I understand, i fixed it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)