player has joined..
#1

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


(Playername), has joined from (location)
Reply
#2

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;
}
Reply
#3

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
Reply
#4

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
Reply
#5

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);
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)