SA-MP Forums Archive
player has joined.. - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: player has joined.. (/showthread.php?tid=586773)



player has joined.. - alexanderjb918 - 25.08.2015

How do i get IRL locations of players so when a player connect's it says


(Playername), has joined from (location)


Re: player has joined.. - brandypol - 25.08.2015

public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}


Re: player has joined.. - R0 - 25.08.2015

You will have to use a web that returns his location using his IP address,you can use this include:
https://sampforum.blast.hk/showthread.php?tid=296171


Re: player has joined.. - Logofero - 25.08.2015

Quote:
Originally Posted by alexanderjb918
Посмотреть сообщение
How do i get IRL locations of players so when a player connect's it says


(Playername), has joined from (location)
You need a plug-in GeoIP


Re: player has joined.. - X337 - 25.08.2015

Use this include :
https://github.com/Whitetigerswt/SAMP-geoip

Then put this code under OnPlayerConnect(playerid)
Код:
new country[56], city[56];
GetPlayerCountry(playerid, country);
GetPlayerCity(playerid, city);
SendClientMessageToAll(-1, "> PART: PlayerNameHere has been logged in! (%s, %s)", country, city);



Re: player has joined.. - alexanderjb918 - 25.08.2015

Yea, many thanks I knew it was somesort of include thanks