Raised This Month: $ Target: $400
 0% 

set_user_hp


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 06-02-2010 , 14:03   Re: set_user_hp
Reply With Quote #4

Quote:
if (PlayerLevel[id] == 78)
{
get_user_health(id)
set_user_health(id, 178)
}
if (
PlayerLevel[id] == 79)
{
get_user_health(id)
set_user_health(id, 179)
}
if (
PlayerLevel[id] == 80)
{
get_user_health(id)
set_user_health(id, 180)
}
blahblahblah...
Instead of all of this, just use this:

Quote:
public Health(id)
{

set_user_health(id, get_user_health(id)+PlayerLevel[id])
}

__________________

SonicSonedit is offline
 



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 05:27.


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