I have this feature on my VIP plugin.
PHP Code:
public hook_death()
{
id = read_data(1) // Killed id
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
return PLUGIN_HANDLED
nHp_add = 35
Killer_hp = get_user_health(id)
Killer_hp += nHp_add
set_user_health(id, Killer_hp)
return PLUGIN_HANDLED
}
It adds +35 hp everytime a VIP player kills someone.
The only problem is that it resets on new round.
Example:
Quote:
|
Round Start. I have 100hp. I killed an enemy. I have 135hp. Round Ends. I have 100hp again...
|
I want to save the HP from last round if it is more than 101 HP.