SA-MP Forums Archive
[Include] Lookup IP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Lookup IP (/showthread.php?tid=644350)



Lookup IP - MasterCodez - 06.11.2017

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


Re: Lookup IP - iDayZ - 06.11.2017

Useful.