Anti_Name[problem]
#1

i made a cmd and it doesent work..if i go on server it says connected and server is restarting i put it at onplyerconnected

pawn Код:
if(AntiName == 1)
                    {
                        if(namestring == -1)
                        {
                            format(string, sizeof(string),"%s, a primit Kick de la Name_BOT!",name);
                            SendClientMessageToAll(COLOR_RED, string);
                            SendClientMessage(playerid, COLOR_YELLOW, "Ministru: Nu iti putem accepta numele.");
                            SendClientMessage(playerid, COLOR_YELLOW, "Hint: Numele tau trebuie sa fie in format Nume_Prenume.");
                            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for Invalid Name",d,m,y,h,mi,s,name);
                            KickLog(string);
                            Kick(playerid);
                            return 1;
                        }
                    }
                    if(IsPlayerNPC(playerid))
                    {
                        SpawnPlayer(playerid);
                        return 1;
                    }
Reply
#2

Post here AntiName
Reply
#3

dont you see it??
Reply
#4

pawn Код:
if(strfind(name, "_", true) == -1)
{
    format(string, sizeof(string),"%s, a primit Kick de la Name_BOT!",name);
    SendClientMessageToAll(COLOR_RED, string);
    SendClientMessage(playerid, COLOR_YELLOW, "Ministru: Nu iti putem accepta numele.");
    SendClientMessage(playerid, COLOR_YELLOW, "Hint: Numele tau trebuie sa fie in format Nume_Prenume.");
    format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for Invalid Name",d,m,y,h,mi,s,name);
    KickLog(string);
    Kick(playerid);
    return 1;
}
Reply
#5

I know this is a long way to do this, but I'm too lazy to edit it:

pawn Код:
new findname = strfind(pname, "_", true);
    if(findname == -1)
    {
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    new findname2 = strfind(pname, "0", true);
    new findname3 = strfind(pname, "1", true);
    new findname4 = strfind(pname, "2", true);
    new findname5 = strfind(pname, "3", true);
    new findname6 = strfind(pname, "4", true);
    new findname7 = strfind(pname, "5", true);
    new findname8 = strfind(pname, "6", true);
    new findname9 = strfind(pname, "7", true);
    new findname10 = strfind(pname, "8", true);
    new findname11 = strfind(pname, "9", true);
    new findname12 = strfind(pname, "[", true);
    if(findname2 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname12 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname3 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname4 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname5 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname6 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname7 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname8 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname9 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname10 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
    if(findname11 != -1)
    {
        format(string43, sizeof(string43), "%s just got kicked for Non RolePlay Name by **Anti-Cheat System Molov**", pname);
        LocalChat(10000000000.0, playerid, string43, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
        SendClientMessage(playerid, COLOR_RED, "Make a roleplay name. Example: John_Peterson or Maria_Hammington");
        Kick(playerid);
    }
Just replace localchat with SendClientMessageToAll or remove it entirely
Reply
#6

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
if(strfind(name, "_", true) == -1)
{
    format(string, sizeof(string),"%s, a primit Kick de la Name_BOT!",name);
    SendClientMessageToAll(COLOR_RED, string);
    SendClientMessage(playerid, COLOR_YELLOW, "Ministru: Nu iti putem accepta numele.");
    SendClientMessage(playerid, COLOR_YELLOW, "Hint: Numele tau trebuie sa fie in format Nume_Prenume.");
    format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for Invalid Name",d,m,y,h,mi,s,name);
    KickLog(string);
    Kick(playerid);
    return 1;
}
i put both of them and the server restarts..
Reply
#7

You could use a released function.
http://forum.sa-mp.com/showpost.php?...postcount=2165
Reply
#8

this doesent work either...
Reply
#9

why does the server kepp restarting?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)