Xierra Posted June 13, 2010 Share Posted June 13, 2010 Hi guys! I want the MTA Team to add these functions client side & server side: setPedOxygenLevel (ped thePlayer, amount) getPedOxygenLevel (ped thePlayer) With getting at amount 0 - 100, as on the example below. example: function getBreath breath = getPedOxygenLevel (getLocalPlayer()) if breath <=25 then outputChatBox("Get out of the water now! You're drowning!!" , 255,0,0, true) else outputChatBox ("You still can hold your breath longer.", 255, 255, 0, true) end end addCommandHandler("checklung", getBreath) PS: Dunno if it works! Phatlooser already requested for this. But nobody looks at it? These functions are used to get the oxygen amount / lung capacity (as seen on the bar between armor and health when in water) It would be good to you guys if these functions are added. The Bugs page: http://www.bugs.mtasa.com/view.php?id=5350 And I confirmed at that suggestion. Link to comment
darkdreamingdan Posted June 13, 2010 Share Posted June 13, 2010 If you can find the memory addresses it'd probably save us some time. Link to comment
Xierra Posted June 13, 2010 Author Share Posted June 13, 2010 (edited) Umm, I'm not a programmer, sorry. But I think I will check out the trainers. Maybe they have the memory adresses. Edit: Damn it's a bit hard to find, I think someone else can also help it. I also made a post at this web: http://www.gtaforums.com/index.php?show ... 99&st=1080 Edited June 13, 2010 by Guest Link to comment
DEFCON1 Posted June 13, 2010 Share Posted June 13, 2010 Address is 0x00B7CDE2. Value when bar is full: 17530, not sure for when bar is empty, but around 16900.. I froze it in Cheat engine and the bar doesn't decrease when under water, and player can't die from drowning. Now searching address of how fast it decrease/increase (I found it earlier I think, but now I've lost it..) Link to comment
Xierra Posted June 14, 2010 Author Share Posted June 14, 2010 Good work, keep finding for those address values. Link to comment
DEFCON1 Posted June 14, 2010 Share Posted June 14, 2010 Sorry I was wrong, I think the correct address is 0x00B7CDE0 which normal value is 1000.0, and as expected, a value of 0 is when you start losing health 'normally' (with a value of 30, you lose health only if you swim, but if you don't move, you don't lose health) Link to comment
DiSaMe Posted June 14, 2010 Share Posted June 14, 2010 Maybe you lose health with a value of 30 because Cheat engine doesn't set oxygen level that quick, so it lowers to 0? Link to comment
DEFCON1 Posted June 14, 2010 Share Posted June 14, 2010 That's it probably. I tried in my custom build, I set it to 1 every frame and I don't die. Link to comment
Recommended Posts