Raised This Month: $ Target: $400
 0% 

Something wrong with set_user_health?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 07-12-2013 , 05:27   Something wrong with set_user_health?
Reply With Quote #1

It still shows 100 *o* what's wrong?
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Health"
#define VERSION "1.1"
#define AUTHOR "DavidJr"

#define DEFAULT_HEALTH 100

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Spawn"player""user_spawn")
    
register_cvar("health_enable""1")
}
public 
client_putinserver(id)
{
    
set_user_health(id,  120)
}
public 
user_spawn(id)
{
    if (
get_cvar_num("health_enable") == 1)
    {
        if(
is_user_connected(id) && is_user_alive(id))
        {
            
set_user_health(id,  120)
        }
    }
    else
    {
        if (
is_user_connected(id) && is_user_alive(id))
        {
            
set_user_health(idDEFAULT_HEALTH)
        }
    }


Last edited by Randomize; 07-12-2013 at 05:28.
Randomize 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 06:27.


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