SA-MP Forums Archive
Get diving - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get diving (/showthread.php?tid=370164)



Get diving - imosek - 19.08.2012

Hi. I have one question. Is there in Pawn a function somthing like "GetPlayerHealth()" just for diving?(It's a blue bar in
the game)...Thanks from God;p


AW: Get diving - Nero_3D - 19.08.2012

Nope there isnt, but the bar just represents how far away you are from the ground, isnt it ?
So you could use the Z value from GetPlayerPos ?


Re: Get diving - Mauzen - 19.08.2012

I think he means the o2 bar. But this also cant be accessed by samp.


Re: Get diving - imosek - 19.08.2012

Yes I mean the o2 bar....I'd like to create a textdraw with breath level...For example if I'm diving the o2 is going down...you know 100 then 99.98.97 during that i'm diving...


Re: Get diving - Arca - 19.08.2012

Quote:
Originally Posted by imosek
Посмотреть сообщение
Yes I mean the o2 bar....I'd like to create a textdraw with breath level...For example if I'm diving the o2 is going down...you know 100 then 99.98.97 during that i'm diving...
If so, then check the interval between o2 level and create a textdraw on top of the bar showing the value which depends on the interval between o2 level.


Re: Get diving - imosek - 19.08.2012

Yes, but how to create a function when a player is below the water? And when is he diving?


Re: Get diving - ELiiTEJaMzZ - 19.08.2012

This include may help you. http://forum.sa-mp.com/showthread.ph...PlayerSwimming


Re: Get diving - imosek - 19.08.2012

But this swimming concerns swimming on the water? For example the crawl..?


Re: Get diving - ELiiTEJaMzZ - 19.08.2012

Quote:
Originally Posted by imosek
Посмотреть сообщение
But this swimming concerns swimming on the water? For example the crawl..?
Yes, but when you go under water, your GetPlayerPos is generally inferior to 0, therefore you can also determine it from that.


Re: Get diving - imosek - 19.08.2012

I'm beginner I don't undestand a lot...