Raised This Month: $ Target: $400
 0% 

Prevent death


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DotNetJunkie
Senior Member
Join Date: May 2005
Location: In front of my pc
Old 01-08-2006 , 01:11   Prevent death
Reply With Quote #1

I wasn't sure about this but is it possible to prevent a player from dying
without giving them godmod?

Thanks!
DotNetJunkie is offline
Send a message via ICQ to DotNetJunkie Send a message via AIM to DotNetJunkie Send a message via MSN to DotNetJunkie Send a message via Yahoo to DotNetJunkie
Jordan
Veteran Member
Join Date: Aug 2005
Old 01-08-2006 , 11:12  
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> #include <fun> public health(id) {          new health = get_user_health(id)          if(health <= x /* <-- your number here*/)          set_user_health(id, 100)          return PLUGIN_CONTINUE }

Something like that.... the problem is that if your health isn't set to like 150, this won't work with awp regular shots or other gun headshots.
Jordan is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-08-2006 , 11:31  
Reply With Quote #3

lol

Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {     register_plugin("whatever","1.0","Hawk552");         register_event("ResetHUD","CheckHealth","be");     register_event("Damage","CheckHealth","be"); } public CheckHealth(id) {     if(get_user_health(id) < 1124)     {         set_user_health(id,1124);     }         return; }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Jordan
Veteran Member
Join Date: Aug 2005
Old 01-08-2006 , 11:40  
Reply With Quote #4

Well I didn't know he wanted the health more than 100
Jordan is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-08-2006 , 11:47  
Reply With Quote #5

It'll appear to the user as though he always has 100 HP, not 1124.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DotNetJunkie
Senior Member
Join Date: May 2005
Location: In front of my pc
Old 01-08-2006 , 12:02  
Reply With Quote #6

Well I tried all of that after doing some searching to discover it doesn't
work with The Specialists so I was trying something else like TSHealth but with no luck
DotNetJunkie is offline
Send a message via ICQ to DotNetJunkie Send a message via AIM to DotNetJunkie Send a message via MSN to DotNetJunkie Send a message via Yahoo to DotNetJunkie
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-08-2006 , 12:13  
Reply With Quote #7

What?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DotNetJunkie
Senior Member
Join Date: May 2005
Location: In front of my pc
Old 01-08-2006 , 12:33  
Reply With Quote #8

Well I tried the examples you gave above but they do not work with
The Specialists unfortunately.
DotNetJunkie is offline
Send a message via ICQ to DotNetJunkie Send a message via AIM to DotNetJunkie Send a message via MSN to DotNetJunkie Send a message via Yahoo to DotNetJunkie
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-08-2006 , 12:45  
Reply With Quote #9

Is there an event for being damaged in TS?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DotNetJunkie
Senior Member
Join Date: May 2005
Location: In front of my pc
Old 01-08-2006 , 13:07  
Reply With Quote #10

There is an event called TSHealth that is triggered when the player's
health is changed however I was unable to block the message and prevent
the player from dying.
DotNetJunkie is offline
Send a message via ICQ to DotNetJunkie Send a message via AIM to DotNetJunkie Send a message via MSN to DotNetJunkie Send a message via Yahoo to DotNetJunkie
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 16:05.


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