Raised This Month: $ Target: $400
 0% 

[Hide'N'Seek] - Heal block 255?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pgez
New Member
Join Date: Aug 2012
Old 08-04-2012 , 14:24   [Hide'N'Seek] - Heal block 255?
Reply With Quote #1

Hellu, this is my first post on this forum so be nice =)

I'm looking for the action code for the heal block
with that I mean,
You buy health... 125+ health, you get hurt, you refill your health to ?100?
can someone please give me the code as your are allowed to heal over 100+ and not only to 100 while you bought your HP.


Btw, I am using cashmod + bollnäs blockmaker.
pgez is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 08-04-2012 , 14:58   Re: [Hide'N'Seek] - Heal block 255?
Reply With Quote #2

Quote:
Originally Posted by pgez View Post
Hellu, this is my first post on this forum so be nice =)

I'm looking for the action code for the heal block
with that I mean,
You buy health... 125+ health, you get hurt, you refill your health to ?100?
can someone please give me the code as your are allowed to heal over 100+ and not only to 100 while you bought your HP.


Btw, I am using cashmod + bollnäs blockmaker.

I know in cashmod there should be an native called cm_get_user_health, or something like that.
Use that one, i think that's the easiest :p
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
pgez
New Member
Join Date: Aug 2012
Old 08-04-2012 , 15:05   Re: [Hide'N'Seek] - Heal block 255?
Reply With Quote #3

Quote:
Originally Posted by MokeN View Post
I know in cashmod there should be an native called cm_get_user_health, or something like that.
Use that one, i think that's the easiest :p
seems I cant find the line with that sentence
anyways here's the heal code
--------------------------
ActionHeal(id, ent)
{
new Float:gametime = get_gametime();
if ( !( gametime >= g_next_heal_time[id] ) ) return PLUGIN_HANDLED;

new health = get_user_health(id);
if ( health >= 100 ) return PLUGIN_HANDLED;

static property[20];

GetProperty(ent, 1, property);
health += str_to_num(property);
set_user_health(id, min(100, health));

GetProperty(ent, 2, property);
g_next_heal_time[id] = gametime + str_to_float(property);

return PLUGIN_HANDLED;
}

-------------------------------------
Shouldn't you add something in this code? o.O
pgez 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 03:55.


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