AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get the Country (https://forums.alliedmods.net/showthread.php?t=172652)

RuRuRu612754 11-24-2011 03:49

Get the Country
 
Code:

#include <amxmodx>
#include <geoip>

new name[32]
new authid[32]
new countries[33][46]
new ips[33][30]

public plugin_init()
{
        register_plugin("PLUGIN", "VERSION", "AUTHOR")
}

public client_connect(id)
{
        get_user_name(id, name, 31)
        get_user_authid(id, authid, 31)
        get_user_ip(id, ips[id], charsmax(ips))
        geoip_country(ips[id], countries[id], charsmax(countries))

        new country[46]
                       
        copy(country, charsmax(country), countries[id])

        client_print(0, print_chat, "%s (%s)  from %s", name, authid, country)
}

Result:
Player (STEAM_0:0:123456) from error

What should I do?

Nyuszy 11-27-2011 04:00

Re: Get the Country
 
where did you tested the plugin?

RuRuRu612754 11-28-2011 00:21

Re: Get the Country
 
Nyuszy

Is my server.

T-z3P 11-28-2011 15:19

Re: Get the Country
 
Try compile your plugin with THIS.

RuRuRu612754 11-28-2011 23:54

Re: Get the Country
 
T-z3P

Player (STEAM_0:0:123456) from error

Some
Player (STEAM_0:0:123456) from Japan
This normally works

Some
Player (STEAM_0:0:123456) from error
This errer works


All times are GMT -4. The time now is 08:26.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.