[Include] Oxygen Controller (Control player oxygen status)
#1

Hey everyone, I give you my first release include, I hope that will come in handy and you will be satisfied..

Short
-- This is include which giving you permission to controll player's oxygen bar.
Code:
#include <OxygenController>
New Callbacks
  • OnPlayerEnterInWater(playerid);
  • OnPlayerEnterUnderWater(playerid);
  • OnPlayerOutFromWater(playerid);
https://github.com/Ino42O/OxygenCont...wiki/Callbacks


Functions
  • IsPlayerInWater(playerid);
    Checking is player on water ( returning: 0 / 1 )
  • IsPlayerUnderWater(playerid);
    Checking is player under water ( returning: 0 / 1 )
  • SetPlayerOxygenValue(playerid, Float:Value);
    Sets player's oxygen value
  • GetPlayerOxygenValue(playerid);
    Get currect oxygen value ( returning: Float )
  • SetPlayerMaxOxygenValue(playerid, Float:Value);
    Sets player's max oxygen value ( Default MAX is 5000.0 )
  • GetPlayerMaxOxygenValue(playerid);
    Get currect max oxygen value ( returning: Float )
  • GivePlayerOxygenValue(playerid, Float:Value);
    Adding value on currect oxygen
  • GetPlayerOxygenStatus(playerid);
    Returning status
  • GetPlayerDepth(playerid); *NEW
    Returning player's depth under water ( returning: Float )
https://github.com/Ino42O/OxygenCont...wiki/Functions


Status
  • OXYGEN_NONE
  • OXYGEN_SPENDING
  • OXYGEN_REFILL

Requests
Credits
  • Created by: Ino
  • SKY plugin: Slice
  • ColAndreas plugin: ColAndreas team
  • ProgressBar include: Toribio / Southclaw

Changes
v1.1
  • Support for last ColAndreas version
  • Optimizied
v2.0
  • Out of beta, now is stable version
  • Added new function for check player's depth under water GetPlayerDepth(playerid);
  • Precise taking / giving oxygen value

Bugs
v1.1
  • Fixed bugs with health bar
v2.0
  • Fixed bugs about player's death
  • Fixed all about healths

Video
https://www.youtube.com/watch?v=Fqy0...ature=*********


Download
(Version 2.0) Include + Example FS - GitHub ( https://github.com/Ino42O/OxygenController )
Reply
#2

I was already able to test this a few months ago out already, great system & work !
Reply
#3

Thank you man, I hope you enjoy..

also soon video work.
Reply
#4

Any screenshots?
Reply
#5

Ye, http://i.imgur.com/3dbNFMX.jpg
controlling that progress up to heal, and this down is from example FS, that is removable ofc..
Reply
#6

Nice work
Reply
#7

What is the point of IgnoreCordinates? It looks like you are using it to ignore water in the quarry and at the BB farm. There is no water at either, so it's useless. ColAndreas doesn't detect water at either of those. ColAndreas is 3D, it doesn't stop at 0 like MapAndreas.
Reply
#8

Quote:
Originally Posted by eco1999
View Post
Nice work
Thanks man



__


Quote:

What is the point of IgnoreCordinates? It looks like you are using it to ignore water in the quarry and at the BB farm. There is no water at either, so it's useless. ColAndreas doesn't detect water at either of those. ColAndreas is 3D, it doesn't stop at 0 like MapAndreas.

There is a problem with water object, try, when i test that i was WTF rly , then i fix it with that code..
Reply
#9

Quote:
Originally Posted by Ivan_Ino
View Post
There is a problem with water object, try, when i test that i was WTF rly , then i fix it with that code..
No, how about you try it. Update your CA and try it.
Reply
#10

Ur right, after i updated it now problem gone, i go make video and update include.. Thanks
Reply
#11

Great job dude, i like it rep!
Reply
#12

Quote:
Originally Posted by N0FeaR
View Post
Great job dude, i like it rep!
Thank you!!


____

Update 1.1
  • Fixed bugs with health bar
  • Support for last ColAndreas version
  • Optimizied
+ Video tomorrow.
Reply
#13

Here is a video - https://www.youtube.com/watch?v=Fqy0...ature=youtu.be
Reply
#14

Swimming pools?
Reply
#15

Quote:
Originally Posted by eco1999
View Post
Swimming pools?
Not all swimming pools are real water. In fact, most of them are just water objects. But why would it matter? You can't swim in those pools.
Reply
#16

Sooo

SetPlayerHealth(playerid, 800000.0);

that disables the GTA oxygen system?
Reply
#17

Nice job this could be used for a lot more then just oxygen
Reply
#18

yea, Thanks guys
Reply
#19

I just added
Code:
#include <OxygenController>
without any further changes but when I tried to compile?
Code:
pawno\include\progress2.inc(434) : error 017: undefined symbol "playerid"
Although My script didn't even reach 434 Code Line.
Reply
#20

Quote:
Originally Posted by Ivan_Ino
Посмотреть сообщение
EDIT: Line 434 in progress2.inc change to, try that..
Worked , when I edited the progress2.inc. Thanks
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)