SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 02/10/2012, 03:38 PM   #1
[CRZ]xRicard[O]x.
Little Clucker
 
Join Date: Sep 2012
Posts: 20
Reputation: -2
Default GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

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: http://forum.sa-mp.com/showthread.php?t=382218

Last edited by [CRZ]xRicard[O]x.; 16/10/2012 at 04:24 PM.
[CRZ]xRicard[O]x. is offline   Reply With Quote
Old 02/10/2012, 03:42 PM   #2
Ghost_Boii
Huge Clucker
 
Ghost_Boii's Avatar
 
Join Date: Sep 2012
Location: Don of Dubai :)
Posts: 311
Reputation: 42
Default Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

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

Ghost_Boii is offline   Reply With Quote
Old 02/10/2012, 04:37 PM   #3
[CRZ]xRicard[O]x.
Little Clucker
 
Join Date: Sep 2012
Posts: 20
Reputation: -2
Default Respuesta: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

Yes. xD
[CRZ]xRicard[O]x. is offline   Reply With Quote
Old 03/10/2012, 02:31 PM   #4
Mr.GeEk
Big Clucker
 
Mr.GeEk's Avatar
 
Join Date: Apr 2011
Posts: 186
Reputation: 0
Default Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

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
Mr.GeEk is offline   Reply With Quote
Old 03/10/2012, 02:36 PM   #5
Lordzy
High-roller
 
Lordzy's Avatar
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,698
Reputation: 1177
Default Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

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.
__________________
Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Old 03/10/2012, 02:37 PM   #6
Knight_Rider
Gangsta
 
Knight_Rider's Avatar
 
Join Date: Apr 2011
Location: India
Posts: 623
Reputation: 4
Default Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

Good 1
__________________
Bub
Knight_Rider is offline   Reply With Quote
Old 03/10/2012, 02:48 PM   #7
xMCx
Huge Clucker
 
xMCx's Avatar
 
Join Date: May 2012
Location: Mars.
Posts: 250
Reputation: 23
Default Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

nice job
xMCx is offline   Reply With Quote
Old 03/10/2012, 05:21 PM   #8
Glint
Guest
 
Posts: n/a
Default Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

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

And please do something about your English.
  Reply With Quote
Old 03/10/2012, 05:24 PM   #9
TheArcher
High-roller
 
TheArcher's Avatar
 
Join Date: Dec 2009
Location: Home
Posts: 2,334
Reputation: 251
Default Re: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

Do you really need 256 cells?
__________________
TheArcher is offline   Reply With Quote
Old 16/10/2012, 03:55 PM   #10
[CRZ]xRicard[O]x.
Little Clucker
 
Join Date: Sep 2012
Posts: 20
Reputation: -2
Default Respuesta: GeoIPSAMP - Simple GeoLocation!, Knowing the Player Country.

* - Added the English language on the website *

DOWNLOAD GeoIPSAMP SCRIPT: http://www.GeoIPSAMP.net84.net/
[CRZ]xRicard[O]x. 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
[Map] Simple kart track on Country LordCumiRing Maps 10 20/03/2011 02:07 AM
[FilterScript] [FS] Short and simple teleport dialog from country to country bartje01 Filterscripts 2 18/03/2010 01:31 PM


All times are GMT. The time now is 11:45 PM.


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