[Tutorial] How to make a fast engine system!
#6

Quote:
Originally Posted by Overhaul
Посмотреть сообщение
^ That, and if I may be honest, you haven't explained much either.

Just for the sake of convenience, you should rename the IsEngineOn variable to something like: 'EngineStatus' and declare it as a bool:
PHP код:
new bool:EngineStatus[MAX_PLAYERS]; 
By declaring it as a boolean, you will no longer have to use the '==' in if statements that use this variable.
PHP код:
if(EngineStatus[playerid]) 
which is equal to
PHP код:
if(EngineStatus[playerid] == 1
and
PHP код:
if(!EngineStatus[playerid]) 
which is equal to
PHP код:
if(EngineStatus[playerid] == 0
That is just for the sake of convenience though.

You declare all the variables that will be put to use in the function's body. Okay, but why? I know why but I am 100 percent sure that other people that don't know will question that. In that case I prefer to go to the wiki and figure it out myself or seek a better tutorial. I am talking about the variables used for the SetVehicleParamsEx function.
Standard(non-boolean) variables can do this too, I don't see your point. And @OP, coding shouldn't be a "fast" process it should be done in an efficient pace but also it should be done so that it works as it should. Fast implies that you are somewhat rushing, something which is a very bad practice in coding.
Reply


Messages In This Thread
How to make a fast engine system! - by ChromeAmazing - 20.05.2015, 20:42
Re: How to make a fast engine system! - by Luis- - 20.05.2015, 20:59
Re: How to make a fast engine system! - by ChromeAmazing - 20.05.2015, 21:08
Re: How to make a fast engine system! - by Overhaul - 20.05.2015, 21:12
Re: How to make a fast engine system! - by Luis- - 20.05.2015, 21:13
Re: How to make a fast engine system! - by Abagail - 20.05.2015, 21:36
Re: How to make a fast engine system! - by Overhaul - 20.05.2015, 22:03
Re: How to make a fast engine system! - by SickAttack - 21.05.2015, 00:46
Re: How to make a fast engine system! - by Jonny5 - 21.05.2015, 13:08
Re: How to make a fast engine system! - by admantis - 23.05.2015, 16:48

Forum Jump:


Users browsing this thread: 2 Guest(s)