Help | Banned IP Message
#9

I dont know how to create the file in the mode, how it will write there the ip of the banned player o.o

PHP код:
    if(strcmp(cmd,"/banip",true)==0)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 5)
        {
             new 
ip[256];
            
ip strtok(cmdtext,idx);
            if(!
strlen(ip))
            {
                
SendClientMessage(playerid,COLOR_GRAD1,"USAGE: /banip [players ip]");
                return 
1;
               }
               if(
strcmp(ip,"93.172.235.134",true) == || strcmp(ip,"5.75.85.197"true) == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"Please do not ban the Scripter..");
            
format(string,sizeof(string),"banip %s",ip);
            
SendRconCommand(string);
            
SendRconCommand("reloadbans");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(string256"AdmWarning: %s has banned IP %s"sendername,ip);
            
ABroadCast(COLOR_YELLOW,string,1);
        }
        return 
1;
    } 
This is going to the samp.ban file...

PHP код:
            format(string,sizeof(string),"banip %s",ip);
            
SendRconCommand(string); 
Reply


Messages In This Thread
Help | Banned IP Message - by arad55 - 11.10.2011, 01:30
Re: Help | Banned IP Message - by DaRkAnGeL[NBK] - 11.10.2011, 01:37
Re: Help | Banned IP Message - by grand.Theft.Otto - 11.10.2011, 01:43
Re: Help | Banned IP Message - by arad55 - 11.10.2011, 05:10
Re: Help | Banned IP Message - by arad55 - 11.10.2011, 15:15
Re: Help | Banned IP Message - by IceCube! - 11.10.2011, 15:40
Re: Help | Banned IP Message - by arad55 - 11.10.2011, 22:19
Re: Help | Banned IP Message - by Scarred - 11.10.2011, 22:21
Re: Help | Banned IP Message - by arad55 - 11.10.2011, 23:12
Re: Help | Banned IP Message - by arad55 - 12.10.2011, 11:12

Forum Jump:


Users browsing this thread: 3 Guest(s)