Raised This Month: $ Target: $400
 0% 

Solved Country Wrong


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-29-2019 , 12:03   Country Wrong
Reply With Quote #1

I do not know why this shows that I connect from GER and I do not from GER.
Would you like someone to check if the code is correct or requires a change?
PHP Code:
#include < amxmodx >
#include < geoip >
#include < colorchat>

#define IsUserAdmin(%1) ( get_user_flags( %1 ) & ADMIN_KICK )

public plugin_init( ) {
    
register_plugin"Connect Announcer""1.0""xPaw" );
    
    
register_messageget_user_msgid"TextMsg" ), "MessageTextMsg" );
}

public 
client_putinserverid )
    
ShowClientMessageid"has connected" );
public 
client_disconnectid )
    
ShowClientMessageid"has disconnected" );

public 
MessageTextMsg( const iMsgId, const iMsgDest, const id ) {
    new 
szMsg17 ];
    
get_msg_arg_string2szMsg16 );
    
    if( 
equalszMsg"#Game_connected" ) ) {
        new 
szIP16 ], szCountry46 ];
        
get_user_ipidszIP15);
    
        if( 
szIP] == 'l' // loopback
            
get_user_ip0szIP15);
        
        
geoip_countryszIPszCountry45 );
        
        if( 
szCountry] == 'e' && szCountry] == 'r' && szCountry] == 'o' )
            return;
        
        new 
szMsg80 ];
        
formatexszMsg79"%%s has connected from %s.^n"szCountry );
        
        
set_msg_arg_string2szMsg );
    }
}
ShowClientMessage( const id, const szAction[ ] ) {
    new 
szNick32 ], szIP16 ], szCode], szCountry46 ];
    
get_user_nameidszNick31 );
    
get_user_ipidszIP15);
    
    if( 
szIP] == 'l' // loopback
        
get_user_ip0szIP15);
    
    if( !
geoip_code2_exszIPszCode ) ) {
        
szCode] = '-';
        
szCode] = '-';
    }
    
    
geoip_countryszIPszCountry45 );
    
    if( 
szCountry] == 'e' && szCountry] == 'r' && szCountry] == 'o' )
        
szCountry "Unknown Country";
    
    
ColorChat0NORMAL"^4[PerfectList]^3 %s^4 %s^1 %s. [ %s ]^4 %s^1."IsUserAdminid ) ? "Admin" "Player"szNickszActionszCodeszCountry );

how can i change the settask show after 3 second of player join

Last edited by Fuck For Fun; 07-03-2019 at 16:04.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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