Raised This Month: $51 Target: $400
 12% 

help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nakashimakun
Senior Member
Join Date: Feb 2010
Location: England
Old 04-27-2010 , 18:39   help.
Reply With Quote #1

Okay I got the script I need to actually work it changes the health of the player accordingly to the level (not sure of the amount tho) I was level 30 and my life had an extra 68 hp.

but

Code:
   
 if ( GetConVarInt(CvarUpgradeHp) > 0 )
    {
        SetEntityHealth( client, GetClientHealth(client) + GetConVarInt(CvarUpgradeHp) * PlayerLevel[client] );
    }
Thats the code I used and it did mod the health so I was wondering could one of you bright sparks turn it from that to a scrip that changes the health of the character by + 5 for every 10 levels he gets.

This script does have a mysql backend so I just need that editing so it can only add 5 hp for every 10 levels

many thanks
NakashimaKun
nakashimakun is offline
meng
Veteran Member
Join Date: Oct 2005
Location: us
Old 04-27-2010 , 19:55   Re: help.
Reply With Quote #2

Maybe

Code:
SetEntityHealth(client, GetClientHealth(client) + (5 * RoundToFloor(float(PlayerLevel[client]) / 10.0)));
__________________
.
[ 1 Dumerils Boa | 1 Cali King ]...
.
I'm a lil' spirituous.
meng is offline
Send a message via Yahoo to meng
nakashimakun
Senior Member
Join Date: Feb 2010
Location: England
Old 04-27-2010 , 20:25   Re: help.
Reply With Quote #3

Okay, That looks more like the code I needed. But that only does the Current health it doesn't do the Max Health if I wanted to do that how would I go about it?
nakashimakun 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 15:26.


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