Home   Help Search Login Register  

Author Topic: Check health  (Read 1034 times)

0 Members and 1 Guest are viewing this topic.

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Check health
« on: 24 Jul 2009, 12:29:37 »
Hey all

Is there a script around that can tell a player how much health they have left? Preferably in a percentage like 'You have 50% health' or something.

Any help would be appreciated

Gruntage
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline dr. seltsam

  • Members
  • *
Re: Check health
« Reply #1 on: 24 Jul 2009, 15:30:10 »
Yes...

make an Init.sqs with the following content:
Code: [Select]
ch=player addAction ["Check Health","Status.sqs"]

Then make the Status.sqs:
Code: [Select]
_u=_this select 0

_h=1-damage _u
_h=_h*100+0.5
_h=_h-_h mod 1

hint format [(name _u)+"\n\nYour health is:\n%1%2",_h,"%"]
exit

 :)
« Last Edit: 24 Jul 2009, 15:32:15 by dr. seltsam »

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Check health
« Reply #2 on: 24 Jul 2009, 16:41:31 »
Thanx a lot  :D :D :D
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba