Raised This Month: $ Target: $400
 0% 

[Request] Save HP from last Round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 04-30-2015 , 07:46   [Request] Save HP from last Round
Reply With Quote #1

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
(idKiller_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.
Syturi0 is offline
 


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 20:13.


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