Well, I've tried editing my code multiple times to try to make it functional, but it still seems not to work in game.
What I want to happen is, when a player dies, force him to join spectator in DoD.
Here's my code:
Code:
// Includes
#include <amxmodx>
#include <fun>
// Plugin Start Woot!
public plugin_init() {
register_plugin ("Send2Spec","1.0","Avatar <eXist`>")
register_cvar ("amxx_sendtospec","1")
register_event ("JoinSpectator","makespec","d")
}
// Change player to spectator after Death
public makespec(id) {
if (!is_user_alive(id) && get_cvar_num( "amxx_sendtospec" ) == 1) {
console_cmd (id,"jointeam 3")
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}