Raised This Month: $ Target: $400
 0% 

Solved Correct parameter for using "TextMsg"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mistrick
Senior Member
Join Date: Aug 2012
Location: Russia
Old 08-15-2019 , 09:23   Re: Correct parameter for using "TextMsg"
Reply With Quote #2

Sender placed in first string param. NumAsString(entindex()) in ClientPrint.

https://github.com/s1lentq/ReGameDLL...hbang.cpp#L177
https://github.com/s1lentq/ReGameDLL...layer.cpp#L435
https://github.com/s1lentq/ReGameDLL.../util.cpp#L664

PHP Code:
public MessageHook_TextMsg(iMsgiMsgDestreciever)   
{   
        if(
get_msg_args() != || !g_eSettings[VarRadio]) return PLUGIN_CONTINUE   

        
static message200 
        static 
handleCvar 
        
new str100 ]  
     
        new const 
messageParam 

        
new sendertemp[8];
        
// first param is WRITE_BYTE(msg_dest);
        // second sender index as string
        
get_msg_arg_string(2tempcharsmax(temp));
        
sender str_to_num(temp);
        
        new 
sz_Health get_user_health sender 
        
        
get_msg_arg_string(messageParammessagecharsmax(message)) 
     
        if(
TrieGetCell(RadioDatasmessagehandleCvar) && get_pcvar_string(handleCvarmessagecharsmax(message))) 
        { 
            
formatex(strcharsmax (str ), "^3[^4%s^3]^1:^4 %n^x01 (RADIO) (^4HP^1:^x03%d^x01):^x04 %s"g_eSettings[VarTagPrefixWithoutColor], sender sz_Health message )  
             
            
set_msg_arg_string(3str)  
        }  
        return 
PLUGIN_CONTINUE   

Mistrick 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 17:18.


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