getting location - 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: getting location (
/showthread.php?tid=578409)
getting location -
suni - 19.06.2015
i really need this but i cant script it. a code for under onplayerconnect
Quote:
[10:08:26] {DDDDDD}PrinceGuaNa[TWN] (6){C0C0C0} has joined the server [Taiwan]
|
help me if you know how make these codes that get location, thanks.
Re: getting location -
DDR3 - 19.06.2015
Код:
public OnPlayerText(playerid, text[])
{
new
hours, // Variable for hours
minutes, // Variable for minutes
seconds, // Variable for seconds
string[128], // String
name[MAX_PLAYER_NAME] // String for name
;
GetPlayerName(playerid,name,sizeof(name)); // Get the typer's name
gettime(hours, minutes, seconds); // Get the time and store it into the variables above
format(string,sizeof(string),"[%d:%d:%d] %s says: %s",hours,minutes,seconds,name,text); // Formats the text with the time variables
SendClientMessageToAll( -1, string); // Send the message to all
return 0; // Returning 0 will disable the traditional SAMP chat.
}
https://sampwiki.blast.hk/wiki/Client_Commands
/timestamp
Re: getting location -
suni - 19.06.2015
thanks for replying but i mean displaying the player's location next to their name
Quote:
PrinceGuaNa[TWN] has joined the server [Taiwan] <<<the player's country name
|
Re: getting location -
Stanford - 19.06.2015
You can use
https://sampforum.blast.hk/showthread.php?tid=521843 which is provided by Emmet_ or use GEOIP, but I recommend Emmet_'s.
To use Emmet_'s here's the structure:
pawn Код:
GetPlayerCountry(playerid, country[], size = sizeof(country));
I hope I helped any feedback is appreciated!