SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 06/11/2017, 12:16 PM   #1
MasterCodez
Little Clucker
 
Join Date: Sep 2017
Posts: 40
Reputation: 0
Default Lookup IP

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

Usage:
Code:
//Put include into your gamemodes
#include <lookup>

Example:
Code:
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:
Code:
DisplayLookupData(playerid, targetid);
GetPlayerHost(playerid);
GetPlayerISP(playerid) ;
GetPlayerCountryCode(playerid);
GetPlayerCountryName(playerid);
GetPlayerCountryRegion(playerid);
IsProxyUser(playerid) ;

Download

If this useful +rep me, Thank you
MasterCodez is offline   Reply With Quote
Old 06/11/2017, 12:40 PM   #2
iDayZ
Banned
 
Join Date: Oct 2017
Posts: 15
Reputation: 3
Default Re: Lookup IP

Useful.
iDayZ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] IP Lookup Script Banana_Ghost Includes 19 29/08/2017 02:25 PM
[Include] Player country lookup Emmet_ Includes 39 11/05/2017 09:38 AM
LookUP iLearner Scripting Help 6 15/01/2017 03:21 PM
IP Lookup on irc suni General 5 09/07/2016 05:11 AM
Lookup.inc problem iThePunisher Scripting Help 5 26/06/2014 05:07 AM


All times are GMT. The time now is 09:59 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.