20.03.2017, 09:33
Some errors:
1. You're mixing indentation styles.
2. This can be shortened:
3. Your commands has a very different style, which can be shortened.
4. Remove , params[]) if params aren't used in the commands.
5. Why you're using public keyword and forwarding them if they are used like ordinary functions?
6. Optimize this
7. Shorten if statements by combining them into one or so.
8. Use Streamer functions instead of using ordinary checkpoints or pick-ups, use dynamic areas and stuff.
1. You're mixing indentation styles.
2. This can be shortened:
PHP код:
JOB_DELIVERER_VEHICLES[ DELIVERER_VEHICLES[ 0 ] ] = 0; JOB_DELIVERER_VEHICLES[ DELIVERER_VEHICLES[ 1 ] ]= 0;
JOB_DELIVERER_VEHICLES[ DELIVERER_VEHICLES[ 2 ] ] = 0; JOB_DELIVERER_VEHICLES[ DELIVERER_VEHICLES[ 3 ] ]= 0;
JOB_DELIVERER_VEHICLES[ DELIVERER_VEHICLES[ 4 ] ] = 0; JOB_DELIVERER_VEHICLES[ DELIVERER_VEHICLES[ 5 ] ]= 0;
4. Remove , params[]) if params aren't used in the commands.
5. Why you're using public keyword and forwarding them if they are used like ordinary functions?
6. Optimize this
PHP код:
if(VID == DELIVERER_VEHICLES[ 0 ] || VID == DELIVERER_VEHICLES[ 1 ] || VID == DELIVERER_VEHICLES[ 2 ] || VID == DELIVERER_VEHICLES[ 3 ] || VID == DELIVERER_VEHICLES[ 4 ] || VID == DELIVERER_VEHICLES[ 5 ])
8. Use Streamer functions instead of using ordinary checkpoints or pick-ups, use dynamic areas and stuff.