SA-MP Forums Archive
Anti_Name[problem] - 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: Anti_Name[problem] (/showthread.php?tid=347324)



Anti_Name[problem] - Dan_Barocu - 01.06.2012

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;
                    }



Re: Anti_Name[problem] - TzAkS. - 01.06.2012

Post here AntiName


Re: Anti_Name[problem] - Dan_Barocu - 01.06.2012

dont you see it??


Re: Anti_Name[problem] - ViniBorn - 01.06.2012

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;
}



Re: Anti_Name[problem] - milanosie - 01.06.2012

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


Re: Anti_Name[problem] - Dan_Barocu - 01.06.2012

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..


Re: Anti_Name[problem] - iggy1 - 01.06.2012

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


Re: Anti_Name[problem] - Dan_Barocu - 02.06.2012

this doesent work either...


Re: Anti_Name[problem] - Dan_Barocu - 02.06.2012

why does the server kepp restarting?