Help in this command.
#2

Код:
CMD:oipcheck(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(!sscanf(params, "s[64]", tmp))
        {
            new dotcount = 0;
            for(new i = 0; i < strlen(tmp); i++)
            {
                if(tmp[i] == '.') dotcount++;
            }
            if(dotcount == 3)
            {
                new link[256];
                format(ipchecking[playerid], 24, "%s", tmp);
                format(link, sizeof(link), "api.ipinfodb.com/v3/ip-city/?key=********&ip=%s", tmp);
                HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
            }
            else
            {
                format(ipchecking[playerid], 24, "%s", tmp);
                strcat(tmp, ".ini")
                if(!fexist(tmp)) return SendClientMessage(playerid, COLOR_GRAD1, "That player does not exist.");
                new link[256];
                format(link, sizeof(link), "api.ipinfodb.com/v3/ip-city/?key=******&ip=%s", dini_Get(tmp, "IP"));
                HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /oipcheck [Player Name or IP]");
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
    }
    return 1;
}
Try this , +rep if I helped.
Reply


Messages In This Thread
Help in this command. - by krytans - 01.09.2014, 12:26
Re: Help in this command. - by meitaredri - 01.09.2014, 13:06
Re: Help in this command. - by krytans - 01.09.2014, 13:15
Re: Help in this command. - by krytans - 01.09.2014, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)