Optimization
#6

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
You're doing 2 different things, in the first code you send a message to the player, where in the second you send a message to 500 player ID's.
You should use SendClientMessageToAll instead of a loop, but still it's useless, as people aren't on when you have just started the gamemode.
You haven't understood my question. Thank you anyway.

Quote:
Originally Posted by Kenway
Посмотреть сообщение
The differents between this two timers that in the second code you using loop to send all players.
better thing to do is
Код:
for(new i=0; i < MAX_PLAYERS+1; i++)
{
      if(IsPlayerConnected(i))
      {
            //Sending the message
      }
}
THis code is sending the message to conntected players..making your script more optimization.
Thanks for your answer it was everything i wanted to know.
Reply


Messages In This Thread
Optimization - by Etolas - 20.02.2015, 07:00
Re: Optimization - by Kenway - 20.02.2015, 07:04
Re: Optimization - by Etolas - 20.02.2015, 07:06
Re: Optimization - by CalvinC - 20.02.2015, 07:09
Re: Optimization - by Kenway - 20.02.2015, 07:10
Re: Optimization - by Etolas - 20.02.2015, 07:12
Re: Optimization - by arakuta - 20.02.2015, 10:13
Re: Optimization - by AndySedeyn - 20.02.2015, 10:30
Re: Optimization - by CalvinC - 20.02.2015, 10:39
Re: Optimization - by Kyance - 20.02.2015, 13:02

Forum Jump:


Users browsing this thread: 1 Guest(s)