Raised This Month: $ Target: $400
 0% 

Constant string return only first letter...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-06-2014 , 07:42   Re: Constant string return only first letter...
Reply With Quote #8

Not sure, but maybe the first element in your g_szAdminPrefixes[][eData] array(the empty string) has to do something with it. Try making it at least {"", 0}, if you already want an empty element.
And you should not recreate chat system like that, you should alter the existing one(hooking "SayText" message). Here's an example:
PHP Code:
public msgSayTextiMsgIdiMsgDestiMsgEnt ) {
    
    static 
szMessage192 ], szNewMessage192 ];
    
    new 
iSender get_msg_arg_int);
    
// Modify only if player is VIP
    
if( is_user_connectediSender ) && g_iVip[iSender]) {
        
        
get_msg_arg_string2szMessagecharsmaxszMessage ) );
            
        if( 
equalszMessage"#Cstrike_Chat_All" ) ) {
            
            
formatexszMessagecharsmaxszMessage ), "^4[VIP] ^3%%s1 ^1: %%s2");
            
set_msg_arg_string2szMessage );
        }
        else if( !
equalszMessage"#Cstrike_Name_Change" ) && !equalszMessage"#Game_radio" ) ) {
            
            
formatexszNewMessagecharsmaxszNewMessage ), "^4[VIP] ^3%s"szMessage );
            
set_msg_arg_string2szNewMessage );
        }
    }


Last edited by klippy; 08-06-2014 at 07:43.
klippy 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 13:16.


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