Help in this command.
#1

pawn Код:
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;
}
My user files are in scriptfiles/users folder where should i define that users folder.
Reply
#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
#3

What's the change in this?
Reply
#4

any one?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)