Solved
The plugin actually had a nice solution! I fixed it a bit with the 'pev_deadflag' as the original code had some stuff that could be written a lot nicer
Code:
register_forward(FM_PlayerPreThink, "dod_player_prethink")
public dod_player_prethink(id)
{
if(pev(id, pev_health) <= 0 && pev(id,pev_team) != 3 && get_pdata_int(id,366) != -1){
//Player is dead and not spectator
set_task(0.4,"dod_player_spawn",id);
set_pev(id, pev_deadflag, DEAD_RESPAWNABLE);
}
}
public dod_player_spawn(id){
set_pev(id, pev_iuser1, 0);
set_pdata_int(id, 264, 0);
dllfunc(DLLFunc_Spawn, id);
}