Raised This Month: $ Target: $400
 0% 

Death Controling.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-15-2007 , 21:51   Death Controling.
Reply With Quote #1

Hey how would you make it so you can detect if more than one death happened within a 1 second period? Then stop the second and kill them a second later?
I have no idea how to..

Thanks.
Styles is offline
Send a message via AIM to Styles
stupok
Veteran Member
Join Date: Feb 2006
Old 04-15-2007 , 23:24   Re: Death Controling.
Reply With Quote #2

Try this:
Code:
#include <amxmodx> #include <amxmisc> #define TIME_PASSED 2 new Float:timer public plugin_init() {     register_plugin("Death Thing", "1.0", "stupok69")     register_event("DeathMsg", "event_DeathMsg", "a") // i forgot if this should be "a" or "b" } public event_DeathMsg() {     new Float:current_time = get_gametime()         if(timer > current_time - TIME_PASSED)     {         //if there is more than one         //death within TIME_PASSED,         //this will be called     }         timer = current_time         return PLUGIN_HANDLED }
stupok is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-16-2007 , 02:35   Re: Death Controling.
Reply With Quote #3

I could have gotten that far but where I get lost is how to STOP the damage and reapply it in the next second.
Styles is offline
Send a message via AIM to Styles
pRED*
Join Date: Dec 2006
Old 04-16-2007 , 03:13   Re: Death Controling.
Reply With Quote #4

Really not that easy..

Stopping damage is almost impossible. Look at some of avalanches plugins for info on how to hook tracelines and stop damage that way. But this only can stop damage from guns. Knives and nades are unaffected.

As for applying damage you can use fakemeta's fakedamage, and user_kill etc etc..
Or you can have a look at sawce's ham samwich module which has functions to both stop and create proper damage (not sure how it works.. havn't tried it.)
pRED* is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-16-2007 , 03:27   Re: Death Controling.
Reply With Quote #5

what about Slowing damage?
Styles is offline
Send a message via AIM to Styles
VEN
Veteran Member
Join Date: Jan 2005
Old 04-16-2007 , 06:38   Re: Death Controling.
Reply With Quote #6

You can stop and "emit" actual damage with a Ham Sandwich module (see Modules / Coding section).
VEN is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-16-2007 , 10:38   Re: Death Controling.
Reply With Quote #7

Thanks VEN. lol thats a great name! It should be part of the core 100% of the way!
Styles is offline
Send a message via AIM to Styles
Reply



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


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