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(iMsg, iMsgDest, id)
{
if(get_msg_args() != 5 || !g_eSettings[VarRadio]) return PLUGIN_CONTINUE
static message[ 200 ]
static handleCvar
new str[ 100 ]
new const messageParam = 5
new sz_Health = get_user_health ( id )
get_msg_arg_string(messageParam, message, charsmax(message))
if(TrieGetCell(RadioDatas, message, handleCvar) && get_pcvar_string(handleCvar, message, charsmax(message)))
{
formatex(str, charsmax (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(3, str)
}
return PLUGIN_CONTINUE
}
__________________