SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 07/05/2016, 03:41 PM   #21
Mark_Samp
Huge Clucker
 
Mark_Samp's Avatar
 
Join Date: Oct 2012
Posts: 329
Reputation: 30
Default Re: Oxygen Controller (Control player oxygen status)

Quote:
Originally Posted by Ivan_Ino View Post
EDIT: Line 434 in progress2.inc change to, try that..
Worked , when I edited the progress2.inc. Thanks
__________________
Quote:
Originally Posted by Tvietnam View Post
Hello all members in forum.sa-mp.com .
I would like to introduce myself tiny in.
I was the first person in Vietnam . sociable fun like especially like looking inquisitive learning . I posted this article so that you can only create one people to recognize me for Samp . Hope you can only thanks very much
because I am the one who should not fluent in Vietnam of your country , so I have to use the ****** translation tool . What if there is no proper word or not , please ignore
Mark_Samp is offline   Reply With Quote
Old 07/05/2016, 07:47 PM   #22
vannesenn
Gangsta
 
vannesenn's Avatar
 
Join Date: Feb 2011
Posts: 609
Reputation: 15
Default Re: Oxygen Controller (Control player oxygen status)

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

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

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
Ivan_Ino is offline   Reply With Quote
Old 08/05/2016, 12:09 AM   #24
vannesenn
Gangsta
 
vannesenn's Avatar
 
Join Date: Feb 2011
Posts: 609
Reputation: 15
Default Re: Oxygen Controller (Control player oxygen status)

Also, you should do code better. Eg. this can be better - static OxygenInit(playerid). Create playertextdraw on player connect, not on server boot.
vannesenn is offline   Reply With Quote
Old 08/05/2016, 01:51 PM   #25
iSteve
Big Clucker
 
Join Date: Apr 2014
Posts: 90
Reputation: 15
Default Re: Oxygen Controller (Control player oxygen status)

Good work, really liked it.
+rep for this
iSteve is offline   Reply With Quote
Old 08/05/2016, 03:02 PM   #26
TheProblem
Banned
 
Join Date: Dec 2013
Location: Spain
Posts: 15
Reputation: 0
Default Re: Oxygen Controller (Control player oxygen status)

Good job!
TheProblem is offline   Reply With Quote
Old 08/05/2016, 05:24 PM   #27
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Default Re: Oxygen Controller (Control player oxygen status)

Thanks guys, also, mini update..

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

now, if you want use foreach add line
Code:
#define _foreach
BEFORE

Code:
#include <OxygenController>
Ivan_Ino is offline   Reply With Quote
Old 08/05/2016, 08:47 PM   #28
VVWVV
Big Clucker
 
Join Date: Jun 2015
Posts: 143
Reputation: 70
Default Re: Oxygen Controller (Control player oxygen status)

Quote:
Originally Posted by Ivan_Ino View Post
Thanks guys, also, mini update..

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

now, if you want use foreach add line
Code:
#define _foreach
BEFORE

Code:
#include <OxygenController>
Yes!
I made the code more optimized and readable.
VVWVV is offline   Reply With Quote
Old 08/05/2016, 09:15 PM   #29
n0minal
High-roller
 
n0minal's Avatar
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,032
Reputation: 758
Default Re: Oxygen Controller (Control player oxygen status)

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

+7 from your friend n0minal
n0minal is offline   Reply With Quote
Old 08/05/2016, 09:36 PM   #30
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 ipsLeon View Post
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..
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 08:07 PM.


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