View Single Post
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-14-2019 , 23:04   Correct parameter for using "TextMsg"
Reply With Quote #1

Hi allied, I'm having trouble printing the name of the player who sent the radio command, instead of the name of the sender, is printing the name of the receiver, I've tried both with the iMsgDest parameter, and with id, I'm a bit lost and I know the answer is probably obvious, thanks in advance.

PHP Code:
register_message(get_user_msgid("TextMsg"), "MessageHook_TextMsg"

public 
MessageHook_TextMsg(iMsgiMsgDestid)  
{  
        if(
get_msg_args() != || !g_eSettings[VarRadio]) return PLUGIN_CONTINUE  

        
static message200 ]
        static 
handleCvar
        
new str100 
    
        new const 
messageParam 5
        
new sz_Health get_user_health id )

        
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], id sz_Health message 
            
            
set_msg_arg_string(3str
        } 
        return 
PLUGIN_CONTINUE  

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 09-09-2019 at 17:58.
iceeedr is offline
Send a message via Skype™ to iceeedr