Offline ban
#1

pawn Код:
CMD:oban(playerid,params[])
{
    new string[124],string1[124];
    if(isnull(params)) return ShowUsageMessage(playerid,"/oban [playername]");
    format(string,sizeof(string),"Users/%s.ini",params);
    if(fexist(string))
    {
        new INI:file = INI_Open(string);
        INI_WriteInt(file,"Banned",1);
        INI_Close(file);
        format(string1,sizeof(string1),"You have banned %s.",params);
        SendClientMessage(playerid,-1,string1);
    }
    else SendClientMessage(playerid,-1,"Account not found");
    return 1;
}
How can i make this ban the ip saved in the file?

pInfo[playerid][IP]

Thanks
Reply
#2

What do you mean? What do you wan't to do with IP?
Reply
#3

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
What do you mean? What do you wan't to do with IP?
Send a rcon command banning the ip, Really, i just want to know how i would go about getting the ip from the file.
Reply
#4

is your script used to store IPs on ini files?
Reply
#5

Quote:
Originally Posted by kirollos
Посмотреть сообщение
is your script used to store IPs on ini files?
Yes

The ip is 'pInfo[playerid][IP]'
Reply
#6

Quote:
Originally Posted by tyler12
Посмотреть сообщение
Yes

The ip is 'pInfo[playerid][IP]'
i dont need this variable in the command.

i only need the field name of the IP in the ini file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)