storing offline player ip into a variable
#7

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
new TempIP[16];

#define PATH    "/Users/%s.ini"

forward OfflineIP(name[], value[]);
public OfflineIP(name[], value[])
{
    INI_String("IP", TempIP, sizeof(TempIP));
    return 1;
}

CMD:unbanip(playerid, params[])
{
    if(isnull(params)) SendClientMessage(playerid,-1,"Usage: /unbanip [player nick]");
    else if(!(2 < strlen(params) < MAX_PLAYER_NAME)) SendClientMessage(playerid,-1,"Error: Incorrect name lenght.");
    else
    {
        new str[40];
        format(str,sizeof(str),PATH,params);
        if(!INI_ParseFile(str, "OfflineIP")) SendClientMessage(playerid,-1,"Error: Account doesn't exists.");
        else
        {
            printf("unbanip %s",TempIP);
            format(str, sizeof(str),"unbanip %s", TempIP);
            SendRconCommand(str);
            //SendRconCommand("reloadbans");
        }
    }
    return 1;
}
hey jeff thanks for trying to help but its not working it will not unban the ip i also tried this
PHP код:
            format(strsizeof(str),"unbanip %s"TempIP);
            
SendClientMessage(playerid,-str); 
but i did not see the ip only " unbanip "
Reply


Messages In This Thread
storing offline player ip into a variable - by SalmaN97 - 23.10.2015, 18:36
Re: storing offline player ip into a variable - by J0sh... - 23.10.2015, 18:43
Re: storing offline player ip into a variable - by PrO.GameR - 23.10.2015, 22:21
Re: storing offline player ip into a variable - by SalmaN97 - 29.10.2015, 12:19
Re: storing offline player ip into a variable - by SalmaN97 - 29.10.2015, 15:24
Re: storing offline player ip into a variable - by Jefff - 29.10.2015, 17:05
Re: storing offline player ip into a variable - by SalmaN97 - 31.10.2015, 21:32
Re: storing offline player ip into a variable - by Jefff - 31.10.2015, 21:58
Re: storing offline player ip into a variable - by SalmaN97 - 01.11.2015, 20:33
Re: storing offline player ip into a variable - by Jefff - 01.11.2015, 21:01

Forum Jump:


Users browsing this thread: 1 Guest(s)