AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [TF2] Killing during setup. (https://forums.alliedmods.net/showthread.php?t=152828)

casvdry 03-14-2011 14:41

[TF2] Killing during setup.
 
Is there a way other than a plugin to prevent others from killing or injuring through gates? Like a way to disable damage dealt during setup time? Kind of like applying bonus round immunity to both teams during setup (Without disabling explosive forces such as rocket jumping, etc)

Thank you.

Invader Amoto 03-14-2011 15:29

Re: [TF2] Killing during setup.
 
You can try hooking "player_hurt" and if the attacker isn't the userid getting hurt, then return Plugin_Stop.

Kevin_b_er 03-14-2011 23:01

Re: [TF2] Killing during setup.
 
That will NOT work.

Blocking the player_hurt event does not change the damage actually dealt. The event is sent out as a notification after the damage is already calculated and worked.

casvdry 03-16-2011 04:01

Re: [TF2] Killing during setup.
 
How could this be done?

Pawn 3-pg 03-16-2011 11:16

Re: [TF2] Killing during setup.
 
You would need to use SDKHooks to hook OnTakeDamage, then just return Plugin_Handled if the attack happened before the round started.

casvdry 03-16-2011 13:57

Re: [TF2] Killing during setup.
 
As with my other request I'll gladly pay $15 (Hope that's fair) if someone can code that for me.

bl4nk 03-16-2011 17:24

Re: [TF2] Killing during setup.
 
2 Attachment(s)
Do all maps on your server have a setup time? I could do this one easily, but it might cause problems on maps without setup.

[edit]

Assuming all maps have a Setup time, the attached plugin should do the trick (requires SDKHooks).

casvdry 03-16-2011 17:45

Re: [TF2] Killing during setup.
 
Thanks bl4nk. Will test and post back with results.

casvdry 03-16-2011 17:55

Re: [TF2] Killing during setup.
 
I get this when testing with my friend and bots and I successfully killed him during setup but I think the plugin never loaded due to an error:

Code:

L 03/16/2011 - 11:42:14: Info (map "cp_dustbowl") (file "errors_20110316.log")
L 03/16/2011 - 11:42:14: [SM] Native "HookEvent" reported: Game event "teamplay_setup_end" does not exist
L 03/16/2011 - 11:42:14: [SM] Displaying call stack trace for plugin "setupdamageblocker.smx":
L 03/16/2011 - 11:42:14: [SM]  [0]  Line 25, setupdamageblocker.sp::OnPluginStart()
L 03/16/2011 - 11:42:20: [SM] Native "GetEntProp" reported: Entity 32 (32) is invalid

Okay I fixed it. The event was teamplay_setup_finished. All works, thanks :)


All times are GMT -4. The time now is 23:56.

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