SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

Thread Tools Display Modes
Old 01/12/2009, 01:32 PM   #1
Little Clucker
Join Date: Aug 2008
Posts: 10
Reputation: 0
Default Why?SetPlayerHealth and Armour problem

new Float:health;
new string[128];
format(string,sizeof(string),"health:%.0f",health) ;

it showed 136 not 5000
that is a big problem with my 3dlabel display

any idea?
kymsar is offline  
Old 01/12/2009, 01:55 PM   #2
Huge Clucker
Join Date: Dec 2008
Posts: 296
Reputation: 0
Default Re: Why?SetPlayerHealth and Armour problem

You can't have a health from 5000, lol :P
A full healthbar uses 100.0, not more. 136 will be the maximum, but with 100 your healthbar will be full.
And you're using an integer at SetPlayerHealth, maybe it's better to use a float.
SetPlayerHealth(playerid, 100.0);
Remi-X is offline  
Old 01/12/2009, 01:58 PM   #3
Correlli's Avatar
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default Re: Why?SetPlayerHealth and Armour problem

Originally Posted by Remi-X
And you're using an integer at SetPlayerHealth, maybe it's better to use a float.
Not in 0.3 version.
Correlli 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
setplayerhealth Headshot1108 Help Archive 8 02/04/2010 06:03 PM
car kill - setplayerhealth 0 jaksimaksi Help Archive 2 11/03/2010 07:18 PM
Health & Armour problem Torran Help Archive 12 23/02/2010 09:18 AM
SetPlayerHealth, integer, wtf!? djuro_zero Help Archive 7 19/10/2009 02:31 PM

All times are GMT. The time now is 10:06 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.