SA-MP Forums Archive
[FilterScript] GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - 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)
+--- Thread: [FilterScript] GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. (/showthread.php?tid=382223)



GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - [CRZ]xRicard[O]x. - 02.10.2012

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


Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - Ghost_Boii - 02.10.2012

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


Respuesta: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - [CRZ]xRicard[O]x. - 02.10.2012

Yes. xD


Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - Mr.GeEk - 03.10.2012

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


Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - Lordzy - 03.10.2012

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.


Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - Knight_Rider - 03.10.2012

Good 1


Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - xMCx - 03.10.2012

nice job


Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - Glint - 03.10.2012

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

And please do something about your English.


Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - TheArcher - 03.10.2012

Do you really need 256 cells?


Respuesta: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country. - [CRZ]xRicard[O]x. - 16.10.2012

* - Added the English language on the website *

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