Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 02.05.2016
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 )
Re: Oxygen Controller (Control player oxygen status) -
JustMe.77 - 02.05.2016
I was already able to test this a few months ago out already, great system & work
![Smiley](images/smilies/smile.png)
!
Re: Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 02.05.2016
Thank you man, I hope you enjoy..
also soon video work.
Re: Oxygen Controller (Control player oxygen status) -
Kyle - 02.05.2016
Any screenshots?
Re: Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 02.05.2016
Ye,
http://i.imgur.com/3dbNFMX.jpg
controlling that progress up to heal, and this down is from example FS, that is removable ofc..
Re: Oxygen Controller (Control player oxygen status) -
Max_Andolini - 02.05.2016
Nice work
Re: Oxygen Controller (Control player oxygen status) -
Crayder - 02.05.2016
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.
Re: Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 02.05.2016
Quote:
Originally Posted by eco1999
Nice work ![Cheesy](images/smilies/biggrin.png)
|
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
![Shocked](images/smilies/surprised.gif)
, then i fix it with that code..
Re: Oxygen Controller (Control player oxygen status) -
Crayder - 03.05.2016
Quote:
Originally Posted by Ivan_Ino
There is a problem with water object, try, when i test that i was WTF rly ![Shocked](images/smilies/surprised.gif) , then i fix it with that code..
|
No, how about you try it. Update your CA and try it.
Re: Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 03.05.2016
Ur right, after i updated it now problem gone, i go make video and update include.. Thanks
Re: Oxygen Controller (Control player oxygen status) -
N0FeaR - 03.05.2016
Great job dude, i like it rep!
Re: Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 03.05.2016
Quote:
Originally Posted by N0FeaR
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.
Re: Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 04.05.2016
Here is a video -
https://www.youtube.com/watch?v=Fqy0...ature=youtu.be
Re: Oxygen Controller (Control player oxygen status) -
Max_Andolini - 04.05.2016
Swimming pools?
Re: Oxygen Controller (Control player oxygen status) -
Crayder - 04.05.2016
Quote:
Originally Posted by eco1999
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.
Re: Oxygen Controller (Control player oxygen status) -
Kar - 04.05.2016
Sooo
SetPlayerHealth(playerid, 800000.0);
that disables the GTA oxygen system?
Re: Oxygen Controller (Control player oxygen status) -
Wolfe - 04.05.2016
Nice job this could be used for a lot more then just oxygen
Re: Oxygen Controller (Control player oxygen status) -
Ivan_Ino - 04.05.2016
yea, Thanks guys
Re: Oxygen Controller (Control player oxygen status) -
Mark_Samp - 07.05.2016
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.
Re: Oxygen Controller (Control player oxygen status) -
Mark_Samp - 07.05.2016
Quote:
Originally Posted by Ivan_Ino
EDIT: Line 434 in progress2.inc change to, try that..
|
Worked , when I edited the progress2.inc. Thanks