View Single Post
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 12-16-2018 , 20:06   Re: player country (geoip)
Reply With Quote #2

Try this

PHP Code:
public client_putinserver(this)
{
    if (
is_user_bot(this))
        return;

    if (
is_user_hltv(this))
        return;

new 
szName[32], szCountry[46], szIp[17];
   
    
get_user_name(thisszNamecharsmax(szName));
    
get_user_ip(thisszIpcharsmax(szIp));
    
geoip_country(szIpszCountrycharsmax(szCountry));
   
    if(!
strlen(szCountry)) szCountry "N/A";
    
    
client_print(0print_chat"Player %s has connected (%s)."szNameszCountry);

__________________

Last edited by SomewhereLost; 12-16-2018 at 20:09.
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost