[FilterScript] GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.
#1

GeoIPSAMP -Simple Geolocation -

- What is?

- To find the country of a player to join the server.

- How it works?

- Sending a request to a website to get the player's country.

- Credits:

- [CRZ]xRicard[O]x.(I, xD)

- ]4[n[T]h0nY]GR[ - Beta Tester.



- Script(no download):

Code:
//Script made by [CRZ]xRicard[O]x.(flomix77@hotmail.com) SA-MP FORUM (Spanish Language).
#include <a_samp>
#include <a_http>

forward LoadCountry(index, response_code, data[]);

public OnPlayerConnect(playerid)
{
	    new pIP[30],string[256];//no change this valule.
	    GetPlayerIp(playerid, pIP, sizeof(pIP));
	    format(string,sizeof(string),"www.GeoIPSAMP.net84.net/geoip/index.php?IP=%s&Licencia=flomix77@hotmail.com",pIP);//Do not delete the license or the script will give an error.
  		HTTP(playerid,HTTP_GET,string,"","LoadCountry");
		return 1;
}




public LoadCountry(index, response_code, data[])
{
    new Reply[256];//Do not change the value, or else the country will cut!.
    if(response_code == 200)
    {
        new NamePlayer[MAX_PLAYER_NAME];
        GetPlayerName(index,NamePlayer,sizeof(NamePlayer));
        format(Reply, sizeof(Reply), ".::|| %s Has joined to server. || Country: %s ||::.",NamePlayer,data);
        SendClientMessageToAll(-1,Reply);
    }
    else
    {
        //error getting the country ..
        format(Reply, sizeof(Reply), "Failed to get the Country, error code: %d", response_code);
        printf(Reply);
        //If for some reason tells * obsolete * license msn contact: flomix77@hotmail.com or theme of the script.
    }
}
- Download:


- Click Here!.

P.D: No Mirrors Pliszz!


- Bugs:

- None found, if found please inform me!.

Sorry for my bad english Guy's xD.
-----------------------------------------------------------------------------
Post In Spanish Language: https://sampforum.blast.hk/showthread.php?tid=382218
Reply
#2

Nice but it is there in every SATDM Gamemode so no need to Give
Reply
#3

Yes. xD
Reply
#4

you have to post the PHP code, any server using this FS can be affected by you (do not know who has your PHP code), it's not bad, it's just for safety
Reply
#5

Quote:
Originally Posted by Ghost_Boii
View Post
Nice but it is there in every SATDM Gamemode so no need to Give
SATDM is a gamemode and it's using GeoIP plugin to detect country.
Where as here HTTP include is used to detect country.

OT:Already GeoIP plugin is released to detect country, but I appreciate your work. Good.
Reply
#6

Good 1
Reply
#7

nice job
Reply
#8

if we compare this to the GeoIP plugin, this will be really slow.

And please do something about your English.
Reply
#9

Do you really need 256 cells?
Reply
#10

* - Added the English language on the website *

DOWNLOAD GeoIPSAMP SCRIPT: http://www.GeoIPSAMP.net84.net/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)