Raised This Month: $ Target: $400
 0% 

Headshot = 100HP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jordy
Junior Member
Join Date: Apr 2006
Old 05-08-2006 , 15:56   Headshot = 100HP
Reply With Quote #1

Hi I'm looking for a plugin so when you make a headshot you get back exactly 100hp. V3X wrote one for me but unforunately it isn't working.

Code:
#include <amxmodx>
#include <fun>

public plugin_init()
{
  register_plugin("100hp on Headshot" , "0.1" , "v3x");
  register_event("DeathMsg" , "event_DeathMsg" , "1>0" , "2>0" , "3=1");
}

public event_DeathMsg()
{
  new id = read_data(2);
  if(is_user_alive(id))
    set_user_health(id , 100);
}
can somebody recheck if its write?
jordy is offline
KoST
Senior Member
Join Date: Jul 2005
Old 05-08-2006 , 16:04  
Reply With Quote #2

try this:

Code:
#include <amxmodx> #include <fun> public plugin_init() {   register_plugin("100hp on Headshot" , "0.1" , "v3x");   register_event("DeathMsg" , "event_DeathMsg" , "1>0" , "2>0" , "3=1"); } public event_DeathMsg() {   new id = read_data(1); // changed 2 -> 1   if(is_user_alive(id))     set_user_health(id , 100); }

http://wiki.amxmodx.org/index.php/Ha...vents#DeathMsg

[edit]
please use small-tags instead of code-tags to make code better readable..
__________________
KoST is offline
jordy
Junior Member
Join Date: Apr 2006
Old 05-08-2006 , 16:39  
Reply With Quote #3

Nope that didn't work either.
jordy is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 05-08-2006 , 17:30  
Reply With Quote #4

Code:
#include <amxmodx> #include <fun> public plugin_init() {   register_plugin("100hp on Headshot" , "0.1" , "v3x");   register_event("DeathMsg" , "event_DeathMsg" , "a" ,  "1>0" , "2>0" , "3=1"); } public event_DeathMsg() {   new id = read_data(1); // changed 2 -> 1   if(is_user_alive(id))     set_user_health(id , 100); }
__________________
FatalisDK is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-08-2006 , 17:41  
Reply With Quote #5

LOL, oops! I forgot the flag >_<
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
jordy
Junior Member
Join Date: Apr 2006
Old 05-08-2006 , 19:26  
Reply With Quote #6

THANK!! now that works.
jordy is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-08-2006 , 19:32  
Reply With Quote #7

Why not just disable headshots??


Code:
set_user_hitzones(0, 0, 253)
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 05-08-2006 , 19:33  
Reply With Quote #8

He wants the player he shot the other player to receive the health reward, not heal the victim.
__________________
FatalisDK is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-08-2006 , 19:55  
Reply With Quote #9

oops...my bad
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
VEN
Veteran Member
Join Date: Jan 2005
Old 05-09-2006 , 06:11  
Reply With Quote #10

Quote:
Hi I'm looking for a plugin so when you make a headshot you get back exactly 100hp
HS kill or any HS shot?
Here is the code for HS hit (victim may have a helmet).

Code:
#include <amxmodx> #include <fun> #include <csx> public plugin_init() {   register_plugin("100hp on Headshot" , "0.1" , "AMXX community"); } public client_damage(attacker,victim,damage,wpnindex,hitplace,TA) {   if(is_user_alive(attacker) && hitplace == HIT_HEAD)     set_user_health(attacker , 100); }
VEN 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 05:07.


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