Raised This Month: $ Target: $400
 0% 

Modified country on name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Point
Junior Member
Join Date: Oct 2014
Old 09-14-2018 , 09:19   Re: Modified country on name
Reply With Quote #3

Quote:
Originally Posted by Airkish View Post
PHP Code:
format(newnamecharsmax(newname), "%s %s"displaynewname); 
->
PHP Code:
format(newnamecharsmax(newname), "%s %s"display[0], newname); 
PHP Code:
#include <amxmodx> 
#include <amxmisc> 

new const ClassNames[][] = { "xx""xx""xx""xx"};

native get_user_class(id);

public 
plugin_init() 

    
register_clcmd("say /put""Command_Put");


public 
client_putinserver(idCommand_Put(id);

public 
client_infochanged(idCommand_Put(id);


public 
Command_Put(id) {

    new 
g_class get_user_class(id);
    
client_print_color(idprint_team_default"^4Your class: %s!"ClassNames[g_class]);
    
    static 
szName[32];
    
get_user_info(id"name"szName,charsmax(szName));
    
    if(
containi(szNameClassNames[g_class]) == -1)
    { 
        
format(szName,charsmax(szName),"%s %s"ClassNames[g_class], szName);
        
set_user_info(id"name"szName);
    } 

I wanna retrieve the class names from other plugin and display them in scoreboard. It works but after i change the class it keeps adding class names instead of switching like :
[Class1] Player
[Class1][Class2] Player
and so on.
Also how can i make it display only on scoreboard and remove from chat? Ty

Last edited by Point; 09-14-2018 at 09:27. Reason: typo
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