Description:
This plugin has been completely re-written so there are no longer timers (as this was a completely unnecessary addition).
This plugin is a perfect example of way too much effort in a dead gamemode.
Requirements:
Quote:
- DHooks
- The gamedata provided in the post.
- If you wish to compile the plugin, you'll need colors_csgo.inc, found here.
Cvars:
Quote:
sm_auto_respawn "1" // Enable Auto-Respawn.
Admin Commands:
Quote:
sm_disableautores //self explanatory (disables respawns)
sm_enableautores //re-enables respawns (disabling spawn killers). can be used early to prevent spawn killers from being enabled.
Functional:
Spoiler
This plugin utilizes 3 detection method, each less favorable than the last.
The first method, checks for any teleport triggers in spawn (as some maps teleport players into the map, instead of spawning them). The teleport location, is saved with the rest of the player spawn points. The plugin then checks for all trigger_hurt entities that surround any of these spawn points. If this trigger is disabled when the round starts, the plugin hooks it and detects if it gets enabled, disabling auto respawn.
The second method, checks if a trigger_hurt activates on a player, within 0.5 seconds of them spawning and then disables auto respawn (this is less favorable as it's an event driven by the player, rather than the map/game, therefore it can be both nearly perfectly accurate or off by a long shot).
The last method, checks if a player dies to a trigger or point_hurt entity within 0.5 seconds of them spawning. This is the least favorable, as to the greatest extent of my knowledge, it is impossible to get the map entity that killed a player in the player_death hook.
Any method used, other than the last, will not allow the map's auto respawn to be overridden, for this reason. If the second detection method is used, it must be triggered before it can be overridden as well.
Last edited by Shane1390; 07-15-2019 at 07:40.
Reason: Rewrite
Bump
Plugin re-written, there were maps that it was ineffective on in the past, this is not the case anymore.
sm_disableautores & sm_enableautores have been added.
I have tested this plugin on every map on my server and believe i have brought it to a point where it is 100% effective. Please contact me if you have any issues.