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

Quote:
Originally Posted by Mark_Samp
View Post
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.
Did you modified anything in include file Oxygen / Progress?
and try download last version of progress inc, cuz i don't have that problem..

EDIT: Line 434 in progress2.inc change to, try that..
Quote:

DestroyAllPlayerProgressBars(i);

Reply
#22

How did you do that? It's amazing bro! Only suggestion is - replace for with foreach in _oxygen_timer. Also You should replace OnPlayerUpdate with timer(eg. 250 ms). It's not like OnPlayerUpdate, but it's better than OPU. And, these functions like GetPlayerMaxOxygenValue you can replace with macro definition

Код:
#define GetPlayerMaxOxygenValue(%0) \
    s_max[%0]
@ Ako me nisi razumio. U timeru "_oxygen_timer" zamijeni for petlju s foreachom. Također mislim da bi trebao sav kod u OnPlayerUpdateu staviti u neki timer koji će se vrtiti svakih 200-250 ms. Neće biti precizno kao OPU, ali će manje derati resurse. Funkcije kao љto je GetPlayerMaxOxygenValue moћeљ zamijeniti s macro definicijama. Macro definicije su kao nekakve varijable u compileru, tokom kompajlanja compiler će zamijeniti GetPlayerMaxOxygenValue(%0) s s_max[%0] gdje je %0 parametar koji upiљeљ(tipa playerid). Sve u svemu, svaka čast, ћao mi je samo љto je to netko napravio prije nego љto je SA-MP dobio takvo љto. Ћalosno al ajd. Rep++
Reply
#23

Thanks man, i know whats macros xD , that about times is pretty good suggestion which i will implement in next update, macros aswell..

Hvala ti, znam sto su macro definicije naravno, to o timeru je dobro, ubacim to u sljedecem updateu kao i macrose.. p.s. drago mi je sresti nase ljude tu xDD
Reply
#24

Also, you should do code better. Eg. this can be better - static OxygenInit(playerid). Create playertextdraw on player connect, not on server boot.
Reply
#25

Good work, really liked it.
+rep for this
Reply
#26

Good job!
Reply
#27

Thanks guys, also, mini update..

VVWVV send me new commit on github with foreach support..

now, if you want use foreach add line
Код:
#define _foreach
BEFORE

Код:
#include <OxygenController>
Reply
#28

Quote:
Originally Posted by Ivan_Ino
Посмотреть сообщение
Thanks guys, also, mini update..

VVWVV send me new commit on github with foreach support..

now, if you want use foreach add line
Код:
#define _foreach
BEFORE

Код:
#include <OxygenController>
Yes!
I made the code more optimized and readable.
Reply
#29

Very impressive Ino, I really loved this include, I'll surely use it if I someday resume my project.

+7 from your friend n0minal
Reply
#30

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Very impressive Ino, I really loved this include, I'll surely use it if I someday resume my project.

+7 from your friend n0minal
Thank you my friend.. i hope u will enjoy using it..
Reply
#31

Just a little question: The oxygen is only used to dive? I thought that GTA's stamina and oxygen were the same thing lmao.
Reply
#32

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Just a little question: The oxygen is only used to dive? I thought that GTA's stamina and oxygen were the same thing lmao.
Oh god...
Reply
#33

Quote:
Originally Posted by GhostHacker
Посмотреть сообщение
Oh god...
Yeah sorry for the dumb question, that's why I shouldn't be awake at 2AM posting shits
Reply
#34

Update 2.0

- Out of beta, stable version
- Fixed some bugs
- Added new function GetPlayerDepth(playerid); (returning Float value)
- Precised giving / taking oxygen value

New function is implement in example script, which you can found on git ->
https://github.com/Ino42O/OxygenController

-> example script
https://github.com/Ino42O/OxygenCont...genExample.pwn
Reply
#35

Great script, Ivan!

5 stars.
Reply
#36

Great script, Ivan!

5 stars.
Reply
#37

Thanks man
Reply
#38

edit : everythings ok, i just had to download latest colandreas plugin versoion
Reply
#39

Код:
[20:53:56] [debug] Run time error 19: "File or function is not found"
[20:53:56] [debug]  SetFakeHealth
[20:53:56] [debug]  SendLastSyncData
[20:53:56] [debug] Run time error 19: "File or function is not found"
[20:53:56] [debug]  SetFakeHealth
[20:53:56] [debug]  SendLastSyncData
[20:53:56] Script[gamemodes/gaixd.amx]: Run time error 19: "File or function is not found"
Reply
#40

Quote:
Originally Posted by ax1
Посмотреть сообщение
Код:
[20:53:56] [debug] Run time error 19: "File or function is not found"
[20:53:56] [debug]  SetFakeHealth
[20:53:56] [debug]  SendLastSyncData
[20:53:56] [debug] Run time error 19: "File or function is not found"
[20:53:56] [debug]  SetFakeHealth
[20:53:56] [debug]  SendLastSyncData
[20:53:56] Script[gamemodes/gaixd.amx]: Run time error 19: "File or function is not found"
Update SKY plugin, also don't forget put SKY (linux 'SKY.so') into your server.cfg file
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)