[SOLVED] Setting health in Ham_Spawn, error come in game
1 Attachment(s)
I am using this code:
PHP Code:
Watch the picture. It worked before, but when i coded abit more (not this health stuff), this happened, then i removed what i made, and its still there :S gPlayerCtHealth[id] and gPlayerTHealth[id] can only be those values: 0, 10, 20, 30, 40, 50. Thanks -zacky |
Re: Setting health in Ham_Spawn, error come in game
Code:
|
Re: Setting health in Ham_Spawn, error come in game
Quote:
And gPlayerCtHealth[id] and gPlayerTHealth[id] can only be those values: 0, 10, 20, 30, 40, 50. |
Re: Setting health in Ham_Spawn, error come in game
Quote:
|
Re: Setting health in Ham_Spawn, error come in game
You don't have to set a float value.
And, you don't have to retrieve it as a float. It will work just like his code should. @zacky 1. Did you register it as a POST hook? Code:
2. If you did register post, add some debug messages: Code:
|
Re: Setting health in Ham_Spawn, error come in game
They need to be float owerthise it always will set 0.
PHP Code:
|
Re: Setting health in Ham_Spawn, error come in game
Better code is #2 by Hev.
Retrieve actual health as a float is fine. Then add to it interger or float, it will still be a float. 100.0 + 10 will pass 110.0 |
Re: Setting health in Ham_Spawn, error come in game
Ok, thanks, i will try all your codes.
|
Re: Setting health in Ham_Spawn, error come in game
Quote:
|
Re: Setting health in Ham_Spawn, error come in game
Thanks Exolent, your way works, i just added float(iHealth)
Now it works fine, thanks :P |
| All times are GMT -4. The time now is 13:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.