26.12.2011, 20:30
Worse example:
This callback will stop working after the first player with Taxijob = 1 and returns an unneeded value.
Probably correct one:
Another version if you don't use any timers or CallRemoteFunction/CallLocalFunction to call this function:
Quote:
pawn Код:
|
Probably correct one:
pawn Код:
forward SendTaxiMessage(color, stringz[]);
public SendTaxiMessage(color, stringz[]) for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) if(Taxijob[i]) SendClientMessage(i, color, stringz);
pawn Код:
stock SendTaxiMessage(color, stringz[]) for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) if(Taxijob[i]) SendClientMessage(i, color, stringz);