GeoIP example uses?
#1

Is there any example uses for using GeoIP include?
I want to make it like this if the player is connecting

"Someone Has Been Connected(New York)"

(Get player's city)
Reply
#2

The functions for the include are pretty straightforward. https://sampforum.blast.hk/showthread.php?tid=296171

Код:
new pName[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{	
    new country[54],
        string[128];
    GetPlayerName(playerid, pName[playerid], MAX_PLAYER_NAME);
    GetPlayerCountry(playerid, country, sizeof(country));
    format(string, sizeof(string), "%s has joined the server from %s.", pName[playerid], country);
    SendClientMessageToAll(-1, string);
}
Reply
#3

so,i can change the GetPlayerCountry to GetPlayerCity?
Reply
#4

Quote:
Originally Posted by PowerF
Посмотреть сообщение
so,i can change the GetPlayerCountry to GetPlayerCity?
Yes. You would have to change the string size to account for longer city names.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)