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

[Request][TF2] Slay player if respawned within x seconds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 01-21-2018 , 13:19   [Request][TF2] Slay player if respawned within x seconds
Reply With Quote #1

Currently have an issue with a plugin allowing players to bypass the respawn timer. Until this issue can be resolved I had the idea of just having another plugin slay a player if they respawn within a certain number of seconds (should be able to modify this as needed). This is really only an issue with Red team as Blu's timer is typically 3-4 seconds so the plugin should only check Red players.
__________________
Phaiz is offline
zyox123cc
Senior Member
Join Date: Jul 2016
Location: spycrab
Old 01-23-2018 , 07:18   Re: [Request][TF2] Slay player if respawned within x seconds
Reply With Quote #2

Code:
else if (PlayerTeam == TeamRed)
		{
			SetRespawnTime(); //Have to do this since valve likes to reset the TF_GameRules during rounds and map changes
			RespawnTime = GetConVarFloat(RespawnTimeRed);
			if (RespawnTime > 0) // Use the timer if the Respawn time is greater 0
			{
				if (GetConVarBool(ShowRespawnMessage))
					PrintHintText(client, "Respawning in %.1f seconds", RespawnTime); //inform the player time to wait for respond
					
				CreateTimer(RespawnTime, SpawnPlayerTimer, client, TIMER_FLAG_NO_MAPCHANGE); //Respawn the player at the specified time
			}
			else if (RespawnTime <= 0) // else respawn the player straight
				SpawnPlayer(client);
		}
try edit https://forums.alliedmods.net/showthread.php?p=611953
__________________
sv_downloadurl Recommended FREE website
000webhost(File is too big (max. 32MB)! Upload will be skipped.)
rejetto
(Local_computer_host)
Getting material/model paths easy way (Windows)
steam profile
Youtube
zyox123cc is offline
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 01-26-2018 , 03:34   Re: [Request][TF2] Slay player if respawned within x seconds
Reply With Quote #3

Quote:
Originally Posted by zyox123cc View Post
Code:
else if (PlayerTeam == TeamRed)
		{
			SetRespawnTime(); //Have to do this since valve likes to reset the TF_GameRules during rounds and map changes
			RespawnTime = GetConVarFloat(RespawnTimeRed);
			if (RespawnTime > 0) // Use the timer if the Respawn time is greater 0
			{
				if (GetConVarBool(ShowRespawnMessage))
					PrintHintText(client, "Respawning in %.1f seconds", RespawnTime); //inform the player time to wait for respond
					
				CreateTimer(RespawnTime, SpawnPlayerTimer, client, TIMER_FLAG_NO_MAPCHANGE); //Respawn the player at the specified time
			}
			else if (RespawnTime <= 0) // else respawn the player straight
				SpawnPlayer(client);
		}
try edit https://forums.alliedmods.net/showthread.php?p=611953
Thanks a lot I'll try this out!

edit-

Yeah that has 7 errors when compiling.

Spoiler
__________________

Last edited by Phaiz; 01-26-2018 at 12:18.
Phaiz is offline
Reply


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 05:41.


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