[Include] Lookup IP
#1

This include using a_json.inc for data hook from extreme-ip-lookup.com

Usage:
pawn Код:
//Put include into your gamemodes
#include <lookup>
Example:
pawn Код:
stock pName(playerid)
{
        new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof name);
    return name;
}

public OnPlayerConnect(playerid)
{
        new str[128];
        format(str, sizeof str, "*Player connected %s from country %s (%s)", pName(playerid), GetPlayerCountryName(playerid), GetPlayerCountryCode(playerid));
        SendClientMessageToAll(-1, str);
}

CMD:ip(playerid, params[])
{
    new targetid;
        if(sscanf(params, "d", targetid)) return SendClientMessage(playerid,  -1, "Usage: /ip [playerid]");
        DisplayLookupData(playerid, targetid);
    return 1;
}


Functions:
pawn Код:
DisplayLookupData(playerid, targetid);
GetPlayerHost(playerid);
GetPlayerISP(playerid) ;
GetPlayerCountryCode(playerid);
GetPlayerCountryName(playerid);
GetPlayerCountryRegion(playerid);
IsProxyUser(playerid) ;
Download

If this useful +rep me, Thank you
Reply
#2

Useful.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)