Raised This Month: $ Target: $400
 0% 

Not geting more than 100hp


Post New Thread Reply   
 
Thread Tools Display Modes
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
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-10-2009 , 14:30   Re: Not geting more than 100hp
Reply With Quote #2

Your code doesn't work ? never ?
What do you call health bug ? 0 HP bug ?

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

public plugin_init()
{
    
register_plugin("Prevent health bug""0.1""Micke1101")

    
register_event("Health""Health_Alive_More_Than_Hundred""be""1>100")
}

public 
Health_Alive_More_Than_Hundred(id)
{
    
set_user_health(id100)

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 06-10-2009 , 14:39   Re: Not geting more than 100hp
Reply With Quote #3

BCM4 when your hurt and goes to heal its supposed to get over 100.
micke1101 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 13:49.


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