Raised This Month: $9 Target: $400

Solved Give the same functionality for the alive players to the dead players

Post New Thread Reply   
Thread Tools Display Modes
Veteran Member
Join Date: Sep 2012
Old 10-21-2021 , 06:34   Re: Give the same functionality for the alive players to the dead players
Reply With Quote #11

Originally Posted by CrazY. View Post
Hook CHalfLifeMultiplay::CheckWinConditions and check the number of alive players, excluding the ones who are supposed to be dead, then force the round to end. To finish the round, you'll need TerminateRound, you won't even need to hook that with orpheu, it can be implemented in amxx, it's just three lines.


If using regamedll and reapi, there is RG_CSGameRules_CheckWinConditions and rg_round_end native.
There are two alternatives I can think of right now if you're not able to use orpheu at all to get the signature for CheckWinConditions.

You will do that same check

but on Ham_Killed and client_remove, this may fail if you transfer a player from his team without actually killing him.

The other is to either set a loop task or create an entity and there do that check. To check if the round is not already ending you can use m_bRoundTerminating.

To show the player as dead in the scoreboard, hook ScoreAttrib and set the flag (1<<0), you don't need DEAD_DEAD.

There is also this plugin which does exactly what you are trying, you may want to check it. https://forums.alliedmods.net/showth...1851?p=1441851

The reason that i don't want to use with this method its because it will interfier with other plugins since the dead players will be counted as alive players.
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Last edited by Natsheh; 10-21-2021 at 09:32.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh

Thread Tools
Display Modes

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 18:23.

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