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

[Closed]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
d3athkai
Junior Member
Join Date: Jul 2009
Old 12-22-2009 , 00:13   [Closed]
Reply With Quote #1

Solved.
__________________


Last edited by d3athkai; 12-24-2009 at 00:44. Reason: Solved.
d3athkai is offline
Lord Canistra
Senior Member
Join Date: Mar 2009
Location: Tallinn, Estonia
Old 12-22-2009 , 08:08   Re: L4D Store player health and return it later
Reply With Quote #2

Use SetEntityHealth(id, health).
__________________
Lord Canistra is offline
d3athkai
Junior Member
Join Date: Jul 2009
Old 12-22-2009 , 09:13   Re: L4D Store player health and return it later
Reply With Quote #3

Cant work
__________________


Last edited by d3athkai; 12-24-2009 at 00:44.
d3athkai is offline
Lord Canistra
Senior Member
Join Date: Mar 2009
Location: Tallinn, Estonia
Old 12-22-2009 , 09:37   Re: L4D Store player health and return it later
Reply With Quote #4

Are you trying to print out health value you got?
Maybe you're working with dead players or non-player entities. May I take a wider look onto your code?
__________________
Lord Canistra is offline
d3athkai
Junior Member
Join Date: Jul 2009
Old 12-22-2009 , 09:45   Re: L4D Store player health and return it later
Reply With Quote #5

cant work
__________________


Last edited by d3athkai; 12-24-2009 at 00:44.
d3athkai is offline
meng
Veteran Member
Join Date: Oct 2005
Location: us
Old 12-22-2009 , 10:14   Re: L4D Store player health and return it later
Reply With Quote #6

your post suggests you are using a local int variable to store the players health. what you would need is a global array.

PHP Code:
// global
new g_playerHP[MAXPLAYERS+1];

// get player hp
g_playerHP[client] = GetClientHealth(client);

// set player hp
SetEntityHealth(clientg_playerHP[client]); 
__________________
.
[ 1 Dumerils Boa | 1 Cali King ]...
.
I'm a lil' spirituous.
meng is offline
Send a message via Yahoo to meng
d3athkai
Junior Member
Join Date: Jul 2009
Old 12-22-2009 , 10:29   Re: L4D Store player health and return it later
Reply With Quote #7

cant work
__________________


Last edited by d3athkai; 12-24-2009 at 00:44.
d3athkai is offline
Lord Canistra
Senior Member
Join Date: Mar 2009
Location: Tallinn, Estonia
Old 12-22-2009 , 10:35   Re: L4D Store player health and return it later
Reply With Quote #8

That's game-specific problem. Maybe some L4D events have to be fired, like healing event (if it does exist). I haven't worked with L4D yet.
__________________
Lord Canistra 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 18:19.


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