Raised This Month: $51 Target: $400
 12% 

Solved [TF2] Blocking round end when players die on 1 team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode