I'm creating an FFA plugin for dodgeball. Have it all working except the player shuffling so that it's genuine free-for-all. Problem is, for example, when 2 players are on red, and 1 is on blu, and the blu guy dies, i need to switch 1 player from red to blu without the round ending.
I've slapped this bit of code everywhere I can think:
PHP Code:
stock bool ChangeClientTeamAlive(int client, int team)
{
int currentteam = GetClientTeam(client);
if((currentteam == 1) || (currentteam == 0))return false;
SetEntProp(client, Prop_Send, "m_lifeState", 2);
ChangeClientTeam(client, team);
SetEntProp(client, Prop_Send, "m_lifeState", 0);
return true;
}
I've put it in player_death event with eventhookmode_pre, teamplay_round_win with eventhookmode_pre, and even in ongameframe(). All of them have the same result where the round ends.
Doing some googling and discording, I came across this outdated
round end prevention thing. I am on linux, so this won't work for me. However, dr!fter included the gamedata which has linux in it that I can use with DHooks. Now the question is, how do I get this to properly work with DHooks and not having a crashed server? Is there any other way of getting the round to not end on me? What do.
__________________