Raised This Month: $ Target: $400
 0% 

Not geting more than 100hp


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 06-10-2009 , 14:27   Not geting more than 100hp
Reply With Quote #1

Can someone see if they can fix this and then tell what was wrong?
Thank you.

(i guess you can tell by looking at the title or the code can tell what its supposed to do but i say it anyway )
Supposed to: Check when health is changed and then see if it got higher than 100 if it did its supposed to set it back to 100

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

public plugin_init() {
    register_plugin("Prevent health bug", "0.1", "Micke1101")
    
    register_event("Health", "health_change", "b")
}
public health_change(id)
{
    new iHealth = get_user_health(id);
    if(iHealth > 100){
        set_user_health(id, 100)
    }
}
micke1101 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 13:49.


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