Raised This Month: $ Target: $400
 0% 

set_user_health


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
cstrike37
Member
Join Date: Jan 2012
Old 07-15-2013 , 23:38   set_user_health
Reply With Quote #1

sometimes it gives 500 health or more instead of 250 if the user spawn too fast.. How do i fix this?
PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fun> 
#include <hamsandwich> 

#define PLUGIN "Bonus Health" 
#define VERSION "1.0" 
#define AUTHOR "cstrike37" 


public plugin_init() { 
   
    
register_plugin(PLUGINVERSIONAUTHOR
    
RegisterHam(Ham_Spawn"player""Spawn"1)
    

public 
Spawn(id

    new 
model[32]
    
cs_get_user_model(idmodelcharsmax(model))
    if (
equal(model"gign"))
    
set_task(1.0"setbonushp"id)
}
public 
setbonushp(id)
{
    
remove_task(0)
    
set_user_health(idget_user_health(id) + 250)


cstrike37 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:28.


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