SAPE ERROR: Не могу подключиться к серверу: dispenser-01.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

SAPE ERROR: Не могу подключиться к серверу: dispenser-02.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

geoip_code2 » AmxModX
| |
 RSS
  • OnLine

    : 4
    : 3
    : -
    : crawl Bot

    ?

    • AMX Mod X
    • up.org.ua


  • : Admin : 19-11-2011, 10:11 : 2093

    geoip_code2

    , , . .

    geoip.inc:
    /**
    * @deprecated
    * Lookup the two character country code for a given IP address.
    *
    * @note This native will overflow the buffer by one cell on an unknown ip lookup!
    * @note Use geoip_code2_ex instead!
    *
    * @param ip        The IP address to lookup.
    * @param result    The result buffer.
    */
    native geoip_code2(const ip[], ccode[3]);


    :
    geoip_code2 ( ip[], ccode[3] )

    • ip[] - ip
    • ccode[3] -


    :
    Native

    :
    /* Plugin generated by AMXX-Studio */

    #include <amxmodx>
    #include <amxmisc>
    #include <geoip>

    #define PLUGIN "[geoip.inc] geoip_code2"
    #define VERSION "1.0"
    #define AUTHOR "Admin"

    public plugin_init() {

        register_plugin(PLUGIN, VERSION, AUTHOR)

        register_clcmd("say /get_country","country")
        register_clcmd("say /gc","country")
            
    }
    public country(id){
        
        new ip[18]
        get_user_ip(id,ip,17,1)
        
        new ccode[3]
        geoip_code2(ip,ccode)
        client_print(id,print_chat,"Code2: %s",ccode)

        
    }


    :
    ip , ip , get_user_ip, .
    ccode, .
    .
    Ru.

    :
    ! .

    , , MaxMind.
    , .
    .
    geoip_code2