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

Hero: Painkiller


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
1sh0t2killz
Senior Member
Join Date: Dec 2004
Old 08-08-2010 , 00:21   Hero: Painkiller
Reply With Quote #1

Painkiller version 1.0

Description
Once your hp is brought down to 0, you'll have 'x' amount of seconds left to live with godmode. The person who brought your hp down to 0 will then kill you after your time is up

Code:
//Painkiller
painkiller_level 0
painkiller_life 4.0	//The amount of seconds Painkiller will live once his hp reaches 0
Note
  • This is an old hero that I made a long time ago, and I just made a lot of optimizations quick without thinking too much, but I tested it once and it seemed to work fine, but post any bugs/problems that you see.
  • I haven't tested it on lasers and such either
  • I also would like to know if there is a way to set the hud hp to 0
Attached Files
File Type: sma Get Plugin or Get Source (sh_painkiller.sma - 1046 views - 2.5 KB)
__________________
I ♥ ⌂ ♫

Last edited by 1sh0t2killz; 08-08-2010 at 00:25. Reason: cleaned up code again
1sh0t2killz is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 08-08-2010 , 07:54   Re: Hero: Painkiller
Reply With Quote #2

I didn't know it was possible to be alive with 0 HP in the HL engine.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
1sh0t2killz
Senior Member
Join Date: Dec 2004
Old 08-08-2010 , 18:03   Re: Hero: Painkiller
Reply With Quote #3

well, i don't wanna set the players health to 0, I just want to fake it if possible.
__________________
I ♥ ⌂ ♫
1sh0t2killz is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 08-08-2010 , 18:05   Re: Hero: Painkiller
Reply With Quote #4

At 256 (or anything that shows 0hp) the movement is fucked up.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 08-08-2010 , 20:38   Re: Hero: Painkiller
Reply With Quote #5

Movement? I have not experienced that before. But if you set the HP to 256, SH monitor will show 256 HP, making it sort of useless.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
1sh0t2killz
Senior Member
Join Date: Dec 2004
Old 08-09-2010 , 21:16   Re: Hero: Painkiller
Reply With Quote #6

hmm, i don't use sh monitor on my server, so 256 seemed to work fine at the time. but ill make an update thatll change some stuff soon
__________________
I ♥ ⌂ ♫
1sh0t2killz is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 08-10-2010 , 06:59   Re: Hero: Painkiller
Reply With Quote #7

Many people these days use SH monitor, including myself. I believe it will just make allot of questions if you set the health to 256.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 08-10-2010 , 09:11   Re: Hero: Painkiller
Reply With Quote #8

Quote:
Originally Posted by DarkGod View Post
At 256 (or anything that shows 0hp) the movement is fucked up.
That why there is this part in superheromod.sma

PHP Code:
public plugin_init()
{
    
register_message(get_user_msgid("Health"), "msg_Health")
 
}
public 
msg_Health(msgiddestid)
{
    
// Run even when mod is off, not a big deal
    
if ( !is_user_alive(id) ) return
 
    
// Fixes bug with health multiples of 256 showing 0 HP on HUD causes keys to be reversed
    
static hp
    hp 
get_msg_arg_int(1)
 
    if ( 
hp 256 == ) {
        
set_msg_arg_int(1ARG_BYTE, ++hp)
    }


Last edited by Fr33m@n; 08-10-2010 at 09:24.
Fr33m@n is offline
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 20:16.


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