Raised This Month: $ Target: $400
 0% 

Modified country on name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Point
Junior Member
Join Date: Oct 2014
Old 09-14-2018 , 00:01   Modified country on name
Reply With Quote #1

I need some help with this.

PHP Code:
#include < amxmodx >
#include < geoip >

#define VERSION "1.0"

new g_country33 ][ ];

public 
plugin_init( ) 
{
    
register_plugin"Country On Name"VERSION"Bboy Grun" );
    
    
register_cvar"country_on_name"VERSIONFCVAR_SERVER FCVAR_SPONLY );
    
set_cvar_string"country_on_name"VERSION );
}

public 
client_putinserverid )
{
    new 
ip32 ], country];
    
get_user_ipidipcharsmaxip ) );
    
    if( 
geoip_code2_exipcountry ) )
    {
        
formatg_countryid ], charsmaxg_country[ ] ), "[%s]"country );
    }
    else
    {
        
g_countryid ] = "[??]";
    }
}

public 
client_disconnectid )
{
    
g_countryid ][ ] = EOS;
}

#define has_good_name(%1) ( %1[ 0 ] == '[' && %1[ 3 ] == ']' && ( %1[ 1 ] == g_country[ id ][ 1 ] || %1[ 1 ] == '?' ) && ( %1[ 2 ] == g_country[ id ][ 2 ]  || %1[ 2 ] == '?' ) )

public client_infochangedid )
{
    if( 
g_countryid ][ ] )
    {
        new 
newname32 ];
        
get_user_infoid"name"newnamecharsmaxnewname ) );
        
        if( !
has_good_namenewname ) )
        {
            
formatnewnamecharsmaxnewname ), "%s %s"g_countryid ], newname );
            
set_user_infoid"name"newname );
            
            return 
PLUGIN_HANDLED;
        }
    }
        
    return 
PLUGIN_CONTINUE;

Any ideas how can i change it to display anything else instead of country name ?

PHP Code:
#include <amxmodx>

new g_name33 ][ ];

new const 
display[][] = {"blabla""lel""help""yas"};

public 
plugin_init() {
    
register_plugin("display""0""")
}

??????????????????
// #define has_good_name(%1) ( %1[ 0 ] == '[' && %1[ 3 ] == ']' && ( %1[ 1 ] == g_country[ id ][ 1 ] || %1[ 1 ] == '?' ) && ( %1[ 2 ] == g_country[ id ][ 2 ]  || %1[ 2 ] == '?' ) )
???????????????????


public 
client_infochangedid )
{
    if(
g_name[id][0])
    {
        new 
newname[32];
        if( !
has_good_namenewname ) ) // ?????????? ^
        
{
            
get_user_info(id"name"newnamecharsmax(newname));
        
            
format(newnamecharsmax(newname), "%s %s"displaynewname);
            
set_user_info(id"name"newname);
            
        return 
PLUGIN_HANDLED;
        }
    }
    
    return 
PLUGIN_CONTINUE;

I'm really confused xD. if anyone can show me, thanks in advance
Point is offline
 



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 07:59.


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