[Include] Oxygen Controller (Control player oxygen status)
#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


Messages In This Thread
Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 02.05.2016, 18:03
Re: Oxygen Controller (Control player oxygen status) - by JustMe.77 - 02.05.2016, 18:05
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 02.05.2016, 18:14
Re: Oxygen Controller (Control player oxygen status) - by Kyle - 02.05.2016, 18:14
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 02.05.2016, 18:17
Re: Oxygen Controller (Control player oxygen status) - by Max_Andolini - 02.05.2016, 20:15
Re: Oxygen Controller (Control player oxygen status) - by Crayder - 02.05.2016, 21:22
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 02.05.2016, 21:32
Re: Oxygen Controller (Control player oxygen status) - by Crayder - 03.05.2016, 00:01
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 03.05.2016, 12:36
Re: Oxygen Controller (Control player oxygen status) - by N0FeaR - 03.05.2016, 15:00
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 03.05.2016, 20:30
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 04.05.2016, 00:35
Re: Oxygen Controller (Control player oxygen status) - by eco1999 - 04.05.2016, 05:37
Re: Oxygen Controller (Control player oxygen status) - by Crayder - 04.05.2016, 06:00
Re: Oxygen Controller (Control player oxygen status) - by Kar - 04.05.2016, 07:35
Re: Oxygen Controller (Control player oxygen status) - by Wolfe - 04.05.2016, 08:44
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 04.05.2016, 11:15
Re: Oxygen Controller (Control player oxygen status) - by Mark_Samp - 07.05.2016, 15:28
Re: Oxygen Controller (Control player oxygen status) - by Mark_Samp - 07.05.2016, 15:41
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 07.05.2016, 15:54
Re: Oxygen Controller (Control player oxygen status) - by vannesenn - 07.05.2016, 19:47
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 07.05.2016, 20:03
Re: Oxygen Controller (Control player oxygen status) - by vannesenn - 08.05.2016, 00:09
Re: Oxygen Controller (Control player oxygen status) - by iSteve - 08.05.2016, 13:51
Re: Oxygen Controller (Control player oxygen status) - by TheProblem - 08.05.2016, 15:02
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 08.05.2016, 17:24
Re: Oxygen Controller (Control player oxygen status) - by VVWVV - 08.05.2016, 20:47
Re: Oxygen Controller (Control player oxygen status) - by n0minal - 08.05.2016, 21:15
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 08.05.2016, 21:36
Re: Oxygen Controller (Control player oxygen status) - by n0minal - 09.05.2016, 03:59
Re: Oxygen Controller (Control player oxygen status) - by GhostHacker - 09.05.2016, 04:19
Re: Oxygen Controller (Control player oxygen status) - by n0minal - 09.05.2016, 04:34
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 11.05.2016, 19:23
Re: Oxygen Controller (Control player oxygen status) - by RogerCosta - 11.05.2016, 20:25
Re: Oxygen Controller (Control player oxygen status) - by RogerCosta - 11.05.2016, 20:28
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 13.05.2016, 23:58
Re: Oxygen Controller (Control player oxygen status) - by ax1 - 15.05.2016, 17:49
Re: Oxygen Controller (Control player oxygen status) - by ax1 - 16.05.2016, 17:52
Re: Oxygen Controller (Control player oxygen status) - by Ivan_Ino - 16.05.2016, 19:39

Forum Jump:


Users browsing this thread: 1 Guest(s)