getting location
#1

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.
Reply
#2

Код:
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
Reply
#3

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

Reply
#4

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)