SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 02/05/2016, 06:03 PM   #1
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Lightbulb Oxygen Controller (Control player oxygen status)

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=youtu.be


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

Last edited by Ivan_Ino; 11/05/2016 at 07:20 PM.
Ivan_Ino is offline   Reply With Quote
Old 02/05/2016, 06:05 PM   #2
JustMe.77
Huge Clucker
 
JustMe.77's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 216
Reputation: 65
Default Re: Oxygen Controller (Control player oxygen status)

I was already able to test this a few months ago out already, great system & work !
JustMe.77 is offline   Reply With Quote
Old 02/05/2016, 06:14 PM   #3
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Default Re: Oxygen Controller (Control player oxygen status)

Thank you man, I hope you enjoy..

also soon video work.
Ivan_Ino is offline   Reply With Quote
Old 02/05/2016, 06:14 PM   #4
Kyle
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,277
Reputation: 330
Default Re: Oxygen Controller (Control player oxygen status)

Any screenshots?
Kyle is offline   Reply With Quote
Old 02/05/2016, 06:17 PM   #5
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Default Re: Oxygen Controller (Control player oxygen status)

Ye, http://i.imgur.com/3dbNFMX.jpg
controlling that progress up to heal, and this down is from example FS, that is removable ofc..
Ivan_Ino is offline   Reply With Quote
Old 02/05/2016, 08:15 PM   #6
Max_Andolini
Huge Clucker
 
Max_Andolini's Avatar
 
Join Date: Oct 2013
Posts: 320
Reputation: 37
Default Re: Oxygen Controller (Control player oxygen status)

Nice work
Max_Andolini is offline   Reply With Quote
Old 02/05/2016, 09:22 PM   #7
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,367
Reputation: 652
Default Re: Oxygen Controller (Control player oxygen status)

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.
Crayder is offline   Reply With Quote
Old 02/05/2016, 09:32 PM   #8
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Default Re: Oxygen Controller (Control player oxygen status)

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..
Ivan_Ino is offline   Reply With Quote
Old 03/05/2016, 12:01 AM   #9
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,367
Reputation: 652
Default Re: Oxygen Controller (Control player oxygen status)

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.
Crayder is offline   Reply With Quote
Old 03/05/2016, 12:36 PM   #10
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Default Re: Oxygen Controller (Control player oxygen status)

Ur right, after i updated it now problem gone, i go make video and update include.. Thanks
Ivan_Ino is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oxygen help :) NeStOr95 Scripting Help 5 06/08/2014 11:54 PM
[FilterScript] Oxygen Cylinder TreePuncher Filterscripts 11 08/11/2012 08:38 PM
Any way to get oxygen level? Baboon Scripting Help 4 16/03/2012 11:39 PM
Oxygen Tank - Roleplay Server Support MrBorsh Server Support 6 22/01/2012 06:28 PM
Oxygen Roleplay - Help Mr.Fames Server Support 6 10/11/2011 06:38 AM


All times are GMT. The time now is 12:26 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.