View Single Post
Author Message
Nanochip
Senior Member
Join Date: Jan 2014
Old 12-14-2017 , 00:46   [TF2] Blocking round end when players die on 1 team
Reply With Quote #1

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 clientint team)
{
    
int currentteam GetClientTeam(client);
    if((
currentteam  == 1) || (currentteam == 0))return false;
    
SetEntProp(clientProp_Send"m_lifeState"2);
    
ChangeClientTeam(clientteam);
    
SetEntProp(clientProp_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.
__________________

Last edited by Nanochip; 01-02-2018 at 11:28.
Nanochip is offline