AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Not geting more than 100hp (https://forums.alliedmods.net/showthread.php?t=94376)

micke1101 06-10-2009 14:27

Not geting more than 100hp
 
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)
    }
}


ConnorMcLeod 06-10-2009 14:30

Re: Not geting more than 100hp
 
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)



micke1101 06-10-2009 14:39

Re: Not geting more than 100hp
 
BCM4 when your hurt and goes to heal its supposed to get over 100.


All times are GMT -4. The time now is 13:49.

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