Posts: 3,324
Threads: 96
Joined: Sep 2013
Quote:
Originally Posted by WASD
Why timer = 6 sec?
And this:
PHP код:
TextDrawShowForPlayer(playerid, Clock[0]);
TextDrawShowForPlayer(playerid, Clock[1]);
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
TextDrawHideForPlayer(i, Clock[0]);
TextDrawHideForPlayer(i, Clock[1]);
TextDrawShowForPlayer(i, Clock[0]);
TextDrawShowForPlayer(i, Clock[1]);
}
Change to:
PHP код:
for(new t; t != 2; t++) TextDrawShowForPlayer(playerid, Clock[t]);
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
for(new t; t != 2; t++) TextDrawHideForPlayer(i, Clock[t]),TextDrawShowForPlayer(i, Clock[t]);
}
|
1. Don't force him to do anything, his version is fine and faster than yours.
2. Are you really still using MAX_PLAYERS as a loop's upper bound? It's 2015, use GetPlayerPoolSize.
3. Using commas to continue a statement is supposed to only work in returns, but either way it is bad coding practice. In fact, I think Y-Less says something about it in a comment on his old Code Optimisations thread.
Posts: 277
Threads: 18
Joined: Jan 2015
Reputation:
0
Keep up the great work I say!
Posts: 3,324
Threads: 96
Joined: Sep 2013
Quote:
Originally Posted by dionisak0s
I see that you have a very beautiful PAWN Editor there, mind if you share it with us?
|
Are you serious, you've never heard of Sublime Text?