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

if i killed someone with knife i get 100 hp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
UaExFanTasY
Senior Member
Join Date: Mar 2013
Location: UAE
Old 06-30-2013 , 02:57   if i killed someone with knife i get 100 hp
Reply With Quote #1

hi people
who know how to make a plugin

if I killed someone wih knife I get 100 hp ???

plz

Last edited by UaExFanTasY; 06-30-2013 at 06:06.
UaExFanTasY is offline
csaba1998
Member
Join Date: Mar 2013
Old 06-30-2013 , 03:15   Re: if i killed someone with knife i get 100 hp
Reply With Quote #2

+100 hp?
csaba1998 is offline
csaba1998
Member
Join Date: Mar 2013
Old 06-30-2013 , 03:20   Re: if i killed someone with knife i get 100 hp
Reply With Quote #3

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

public plugin_init()
{
    register_plugin("100 HP", "1.0", "RaZzoR")
    register_event("DeathMsg", "death", "a", "1>0") 
}

public death(id)
{
    new wpn[3]
    new attacker = read_data(1)
    read_data(4,wpn,2)

    if (wpn[0] == 'k')
    {      
           set_user_health(attacker, 100)
    }
    return PLUGIN_CONTINUE
}
csaba1998 is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-30-2013 , 04:06   Re: if i killed someone with knife i get 100 hp
Reply With Quote #4

Quote:
Originally Posted by csaba1998 View Post
Here:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init()
{
    register_plugin("100 HP", "1.0", "RaZzoR")
    register_event("DeathMsg", "death", "a", "1>0") 
}

public death(id)
{
    new wpn[3]
    new attacker = read_data(1)
    read_data(4,wpn,2)

    if (wpn[0] == 'k')
    {      
           set_user_health(attacker, 100)
    }
    return PLUGIN_CONTINUE
}
parameter 4 isn't a string.
TheDS1337 is offline
5aloOod
Senior Member
Join Date: Jun 2013
Location: hell
Old 06-30-2013 , 04:57   Re: if i killed someone with knife i get 100 hp
Reply With Quote #5

UaExFanTasY in which mod u will but this plugin ?
5aloOod is offline
UaExFanTasY
Senior Member
Join Date: Mar 2013
Location: UAE
Old 06-30-2013 , 06:05   Re: if i killed someone with knife i get 100 hp
Reply With Quote #6

Quote:
Originally Posted by csaba1998 View Post
+100 hp?
yes and thanks

gonna test it
UaExFanTasY is offline
UaExFanTasY
Senior Member
Join Date: Mar 2013
Location: UAE
Old 06-30-2013 , 06:24   Re: if i killed someone with knife i get 100 hp
Reply With Quote #7

I test it its reset my hp to 100

but I want to give extra hp +100

like if I have 100 and I killed with knife I get +100 = my hp will be 200
UaExFanTasY is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 06-30-2013 , 07:07   Re: if i killed someone with knife i get 100 hp
Reply With Quote #8

Quote:
Originally Posted by UaExFanTasY View Post
I test it its reset my hp to 100

but I want to give extra hp +100

like if I have 100 and I killed with knife I get +100 = my hp will be 200
do you want a max hp?

because if you kill 3 or more people with knife you will get ALOT of HP
__________________
Blizzard_87 is offline
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 06-30-2013 , 07:12   Re: if i killed someone with knife i get 100 hp
Reply With Quote #9

Quote:
Originally Posted by UaExFanTasY View Post
yes and thanks

gonna test it
change
PHP Code:
set_user_health(attacker100
to

PHP Code:
new iHealth get_user_health(attacker)
set_user_health(attackeriHealth+100
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here

Last edited by Shooting King; 06-30-2013 at 07:12.
Shooting King is offline
darcadarca
Senior Member
Join Date: Feb 2012
Location: Romania
Old 06-30-2013 , 09:56   Re: if i killed someone with knife i get 100 hp
Reply With Quote #10

use this. @ tested.

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

#define PLUGIN "100 hp"
#define VERSION "1.0"
#define AUTHOR "dArcA."

#define HP_MAX 100  // EDIT ME

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("DeathMsg", "death", "a") 
}

public death(id)
{
	static atacker,weapon;
	atacker = read_data(1);
	weapon = get_user_weapon(atacker);
	
	if ( is_user_alive(atacker))
	{
		if(weapon == CSW_KNIFE)
		{
			set_user_health(atacker, min(HP_MAX, get_user_health(atacker) + 100));
		}
	}
}
Attached Files
File Type: sma Get Plugin or Get Source (hponkill.sma - 430 views - 516 Bytes)
__________________
hqqqqqqqq

Last edited by darcadarca; 06-30-2013 at 09:57. Reason: forgot
darcadarca is offline
Send a message via Yahoo to darcadarca
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 10:07.


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