Well, I found a code that can detect if a player spectates in a certain mode... but not if he switches the player in that mode, what's the best way to detect WHEN a spectator views another player than the old one in the same spec mode ?
the code I got 'till now:
PHP Code:
register_message(get_user_msgid("TextMsg"), "msg_textMsg")
//...
public msg_textMsg(msgid, dest, id)
{
static msg[32]
get_msg_arg_string(2, msg, 31)
if(equali(msg, "#Spec_Mode4"))
client_print(0, print_chat, "[debug] %s spectating %s in %d mode", get_player_name(id), get_player_name(entity_get_int(id, EV_INT_iuser2)), entity_get_int(id, EV_INT_iuser1))
return PLUGIN_CONTINUE
}
and I debugged the textmsg, doesn't trigger when I change a player...
__________________