Small problem
#1

Hi,i made a sort of auto blacklist.When an admin ban a player,the banned player name going in a .txt file and OnPlayerConnect i made this.

pawn Код:
if(strcmp(dini_Get("/blacklist.txt",name),true)
    {
        format(msg,sizeof msg,"7,2EVADER ALERT: Possible ban evade from %s - Autoban done.",name);
        IRC_GroupSay(IRC_Group, EchoChan, msg);
        if(strcmp(IP,dini_Get("/aips.log",name),true) == 0)
        {
            format(msg,sizeof msg,"7,2AC ALERT: (ID: 505) - Detected ban evasion by %s with IP: %s",name,IP);
            format(msg,sizeof msg,"7,2AC ALERT: (ID: 505) - The IP %s is associated at ban evader %s from country %s",IP,name,GetPlayerCountryName(playerid));
            format(msg,sizeof msg,"7,2AC ALERT: (ID: 505) - %s with IP: %s was Auto Kicked by AntiCheat for Attempted Ban Evasion.",name,IP);
            IRC_GroupSay(IRC_Group, EchoChan, msg);
            BanEx(playerid, "Banned by System for: BAN EVASION.");
            format(msg,sizeof msg,"banip %s",IP);
            SendRconCommand(msg);
        }
        return Ban(playerid);
    }
It work in this way:

When a player connect,the server will check if the name is in blacklist.txt

IF IS in that file,than the player will be automatically re-banned,but i got a problem:

error 035: argument type mismatch (argument 2)

Error line is:

pawn Код:
if(strcmp(dini_Get("/blacklist.txt",name),true)
Thanks.
Reply
#2

You can't use strcmp in dini_Get. Use:
pawn Код:
if ( dini_Get ( "/blacklist.txt",name ) )
Reply
#3

error 033: array must be indexed (variable "dini_Get")
Reply
#4

BUMP.
Reply
#5

pawn Код:
new file[256];
format(file, sizeof(file), "blacklist.txt");
if ( dini_Get (file, name ) )
?
Reply
#6

Same error.
Reply
#7

You forgot a ).

from: if(strcmp(dini_Get("/blacklist.txt",name),true)
to: if(strcmp(dini_Get("/blacklist.txt",name),true))
Reply
#8

How do you save a name to the blacklist?
Reply
#9

@Mokerr,now i get this:

error 035: argument type mismatch (argument 2)

@MadeMan,i use custom log system to save the name of player when gets banned.
Reply
#10

pawn Код:
if(strcmp(dini_Get("/blacklist.txt",name),name,true) == 0)
But not sure if it works, because I don't know how you save it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)