Raised This Month: $ Target: $400
 0% 

Hero cant be killed by certain weapons...?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
craze
Junior Member
Join Date: Oct 2005
Old 10-16-2005 , 21:55   Hero cant be killed by certain weapons...?
Reply With Quote #1

How can I make it so that a specific person cannot be killed by an AK47 or other gun?

would i use something like get_user_attacker and find the weapon they're using and then find the dmg they're doing and then give the hero that much health?
craze is offline
Send a message via AIM to craze Send a message via MSN to craze
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 10-16-2005 , 21:59  
Reply With Quote #2

I believe you can use fakemeta (amxx) and catch the traceline

and BLOCK bullets. I recently found out about this and its quite cool.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
craze
Junior Member
Join Date: Oct 2005
Old 10-16-2005 , 23:48  
Reply With Quote #3

anyway to stop knife damage?
craze is offline
Send a message via AIM to craze Send a message via MSN to craze
mydas
Senior Member
Join Date: Mar 2005
Old 10-16-2005 , 23:49  
Reply With Quote #4

omg. so damage CAN be prevented ? share it with us !
__________________
[2021] I would love to revive SHMOD.

My heroes: SLAYER, Akasha, Achilles, Robo-Ky,Justice, Potemkin, Juggernaut, Mirage, Leviathan, Tyrael, Marduk, Omega Red
mydas is offline
Send a message via Yahoo to mydas
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-16-2005 , 23:49  
Reply With Quote #5

godmode?
Edit: Yes mydas.

FYI: A while ago i had started on a project which basicly gets rid of current CS damage system and give you a brand new system where you are able to edit damage thats about to be done, block, etc.
Ive never finished it but i might just pick it up sometime later
http://tcwonline.org/cgi-bin/viewcvs...viewcvs-markup
Freecode is offline
craze
Junior Member
Join Date: Oct 2005
Old 10-16-2005 , 23:50  
Reply With Quote #6

how do i make my hero protected from knives only?
craze is offline
Send a message via AIM to craze Send a message via MSN to craze
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 10-16-2005 , 23:56  
Reply With Quote #7

Alright, I heard about this trace stuff for a while on the amxmodx forum, and now I'm eager to find out how to use fake_meta to prevent damage. Because this way doesn't work, if the damage dealt is more than the user's health.

Code:
register_event("Damage", "damage_event", "b") public damage_event(id) {    new damage = read_data(2)    new currentHealth = get_user_health(id)    new weapon, attacker = get_user_attacker(id, weapon)    if(weapon == /*so and so*/)       set_user_health(id, currentHealth + damage) }
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
craze
Junior Member
Join Date: Oct 2005
Old 10-16-2005 , 23:58  
Reply With Quote #8

Quote:
Originally Posted by Gorlag/Batman
Alright, I heard about this trace stuff for a while on the amxmodx forum, and now I'm eager to find out how to use fake_meta to prevent damage. Because this way doesn't work, if the damage dealt is more than the user's health.

Code:
register_event("Damage", "damage_event", "b") public damage_event(id) {    new damage = read_data(2)    new currentHealth = get_user_health(id)    new weapon, attacker = get_user_attacker(id, weapon)    if(weapon == /*so and so*/)       set_user_health(id, currentHealth + damage) }
thats exactly what I had in mind! I just didn't know the synthax..thats all
thanks alot batman
craze is offline
Send a message via AIM to craze Send a message via MSN to craze
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 10-16-2005 , 23:59  
Reply With Quote #9

Yeah no problem, but just remember, that this doesn't work if the damage dealt is greater than the user's health. That's where fake_meta would come in. Of course I mainly use engine, so I don't know much about fake_meta yet.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 10-17-2005 , 07:18  
Reply With Quote #10

Quote:
Originally Posted by mydas
omg. so damage CAN be prevented ? share it with us !
I dont actually know how, I just came across it in some post on amxx forums. look for stuff about trace_line (I think). not the native trace_line though, it was registering the trace_line event using fakemeta
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
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 12:22.


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