Problema con el plugins Ghw_connect >SOLUCIONADO<
#1
Buenas el problema que tengo con este plugins es el siguiente:

Cuando yo lo compilo con v1.9.0:5241 me lanza un problema con el geoip_country me dice que lo actualice a geoip_country_ex, entonces cuando lo coloco me sale este error.

1.- REFLEJA CUANDO ME DICE QUE ACTUALICE

[Imagen: 4CrtHmU.jpg]

2.- CUANDO LO ACTUALIZO ME SALE ESTE ERROR

[Imagen: JTPGgK3.jpg]

CODIGO SMA
Código PHP:
/*
*   _______     _      _  __          __
*  | _____/    | |    | | \ \   __   / /
*  | |         | |    | |  | | /  \ | |
*  | |         | |____| |  | |/ __ \| |
*  | |   ___   | ______ |  |   /  \   |
*  | |  |_  |  | |    | |  |  /    \  |
*  | |    | |  | |    | |  | |      | |
*  | |____| |  | |    | |  | |      | |
*  |_______/   |_|    |_|  \_/      \_/
*
*
*
*  Last Edited: 12-06-09
*
*  ============
*   Changelog:
*  ============
*
*  v1.1
*    -Bug Fixes
*
*  v1.0
*    -Initial Release
*
*/

#define VERSION    "1.1"

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

#define SHOW_COLOR        1
#define SHOW_CONNECT        2
#define SHOW_DISCONNECT        4
#define PLAY_SOUND_CONNECT    8
#define PLAY_SOUND_DISCONNECT    16

new display_type_pcvar

new name[33][32]
new 
authid[33][32]
new 
country[33][46]
new 
ip[33][32]

new 
connect_soundfile[64]
new 
disconnect_soundfile[64]

new 
saytext_msgid

public plugin_init()
{
    
register_plugin("GHW Connect Messages",VERSION,"GHW_Chronic")
    
display_type_pcvar register_cvar("cm_flags","31")
    
register_cvar("cm_connect_string","^x04[^x01 FOS^x04 ] ^x01Jugador  ^x03[%name^x03]^x01 Se ha conectado desde ^x03[%country^x03]")
    
register_cvar("cm_disconnect_string","^x04[^x01 FOS^x04 ] ^x01Jugador  ^x03[%name^x03]^x01 Se ha desconectado ^x03[%steamid^x03]")

    
saytext_msgid get_user_msgid("SayText")
}

public 
plugin_precache()
{
    
register_cvar("cm_connect_sound","FOS_Conectar/FOS_conectar.wav")
    
register_cvar("cm_disconnect_sound","FOS_Conectar/FOS_desconectar.wav")

    
get_cvar_string("cm_connect_sound",connect_soundfile,63)
    
get_cvar_string("cm_disconnect_sound",disconnect_soundfile,63)

    
precache_sound(connect_soundfile)
    
precache_sound(disconnect_soundfile)
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id))
    {
        
get_client_info(id)

        new 
display_type get_pcvar_num(display_type_pcvar)
        if(
display_type SHOW_CONNECT)
        {
            new 
string[200]
            
get_cvar_string("cm_connect_string",string,199)
            
format(string,199,"^x01%s",string)

            if(
display_type SHOW_COLOR)
            {
                new 
holder[46]

                
format(holder,45,"^x04%s^x01",name[id])
                
replace(string,199,"%name",holder)

                
format(holder,45,"^x04%s^x01",authid[id])
                
replace(string,199,"%steamid",holder)

                
format(holder,45,"^x04%s^x01",country[id])
                
replace(string,199,"%country",holder)

                
format(holder,45,"^x04%s^x01",ip[id])
                
replace(string,199,"%ip",holder)
            }
            else
            {
                
replace(string,199,"%name",name[id])
                
replace(string,199,"%steamid",authid[id])
                
replace(string,199,"%country",country[id])
                
replace(string,199,"%ip",ip[id])
            }

            new 
numplayers[32], player
            get_players
(players,num,"ch")
            for(new 
i=0;i<num;i++)
            {
                
player players[i]

                
message_begin(MSG_ONE,saytext_msgid,{0,0,0},player)
                
write_byte(player)
                
write_string(string)
                
message_end()

                if(
display_type PLAY_SOUND_CONNECT)
                {
                    new 
stringlen strlen(connect_soundfile)
                    if(
connect_soundfile[stringlen 1]=='v' && connect_soundfile[stringlen 2]=='a' && connect_soundfile[stringlen 3]=='w'//wav
                    
{
                        
client_cmd(player,"spk ^"sound/%s^"",connect_soundfile)
                    }
                    if(
connect_soundfile[stringlen 1]=='3' && connect_soundfile[stringlen 2]=='p' && connect_soundfile[stringlen 3]=='m'//wav
                    
{
                        
client_cmd(player,"mp3 play ^"sound/%s^"",connect_soundfile)
                    }
                }
            }
        }
    }
}

public 
get_client_info(id)
{
    
get_user_name(id,name[id],31)
    
get_user_authid(id,authid[id],31)

    
get_user_ip(id,ip[id],31)
    
geoip_country_ex(ip[id],country[id])
    if(
equal(country[id],"error"))
    {
        if(
contain(ip[id],"192.168.")==|| equal(ip[id],"127.0.0.1") || contain(ip[id],"10.")==||  contain(ip[id],"172.")==0)
        {
            
country[id] = "LAN"
        
}
        if(
equal(ip[id],"loopback"))
        {
            
country[id] = "ListenServer User"
        
}
        else
        {
            
country[id] = "Pais Desconocido"
        
}
    }
}

public 
client_infochanged(id)
{
    if(!
is_user_bot(id))
    {
        
get_user_info(id,"name",name[id],31)
    }
}

public 
client_disconnected(id)
{
    if(!
is_user_bot(id))
    {
        new 
display_type get_pcvar_num(display_type_pcvar)
        if(
display_type SHOW_DISCONNECT)
        {
            new 
string[200]
            
get_cvar_string("cm_disconnect_string",string,199)
            
format(string,199,"^x01%s",string)

            if(
display_type SHOW_COLOR)
            {
                new 
holder[46]

                
format(holder,45,"^x04%s^x01",name[id])
                
replace(string,199,"%name",holder)

                
format(holder,45,"^x04%s^x01",authid[id])
                
replace(string,199,"%steamid",holder)

                
format(holder,45,"^x04%s^x01",country[id])
                
replace(string,199,"%country",holder)

                
format(holder,45,"^x04%s^x01",ip[id])
                
replace(string,199,"%ip",holder)
            }
            else
            {
                
replace(string,199,"%name",name[id])
                
replace(string,199,"%steamid",authid[id])
                
replace(string,199,"%country",country[id])
                
replace(string,199,"%ip",ip[id])
            }

            new 
numplayers[32], player
            get_players
(players,num,"ch")
            for(new 
i=0;i<num;i++)
            {
                
player players[i]

                
message_begin(MSG_ONE,saytext_msgid,{0,0,0},player)
                
write_byte(player)
                
write_string(string)
                
message_end()

                new 
stringlen strlen(disconnect_soundfile)
                if(
disconnect_soundfile[stringlen 1]=='v' && disconnect_soundfile[stringlen 2]=='a' && disconnect_soundfile[stringlen 3]=='w'//wav
                
{
                    
client_cmd(player,"spk ^"sound/%s^"",disconnect_soundfile)
                }
                if(
disconnect_soundfile[stringlen 1]=='3' && disconnect_soundfile[stringlen 2]=='p' && disconnect_soundfile[stringlen 3]=='m'//wav
                
{
                    
client_cmd(player,"mp3 play ^"sound/%s^"",disconnect_soundfile)
                }
            }
        }
    }

»» RENTA TU SERVIDOR EN EVOLUTIÓN-HOST ««

Si deseas contactarme para comprar tu servidor de counter-strike puedes enviar un M.P
Responder
#2
Código PHP:
geoip_country_ex(ip[id],country[id])
-->
geoip_country_ex(ip[id], country[id], charsmax(country[])) 

No pasa nada si lees la wiki antes de hacer tantos temas al dope
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#3
(17/05/2019, 10:09 PM)kikizon2 escribió:
Código PHP:
geoip_country_ex(ip[id],country[id])
-->
geoip_country_ex(ip[id], country[id], charsmax(country[])) 

No pasa nada si lees la wiki antes de hacer tantos temas al dope

Gracias kikizon, solo eso necesitaba acomodar. disculpe las molestias, de todas formas eran cosas sencillas amigo.
»» RENTA TU SERVIDOR EN EVOLUTIÓN-HOST ««

Si deseas contactarme para comprar tu servidor de counter-strike puedes enviar un M.P
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)