settimer loop in OnGameModeInit bug
#1

hi,

I have 4 settimer who run on the OnGameModeInit, settimer(n1,1000,1) settimer(n2,1000,1) settimer(n3,1000,1) settimer(n4,1000,1) all +- 1200 lines.

So i have changed the timer numbers, 5 or i make settimer(tt,500,0) tt=settimer(n4,1000,1) or add timer_add
but they are always sometime a settimer who dont run for a player or everybody.

cc: 1200 lines is many for to be read in 1 sc i thinks.
Reply
#2

are you defining variables to the timers?

example:
Код:
new timer;
forward Timer();
public OnGameModeInit()
{
  timer = SetTimer("Timer", 1000, true);
  return 1;
}
Reply
#3

yes it's work, but when its run together sometime, a settimer dont work for all players
Reply
#4

Quote:
Originally Posted by nico005
yes it's work, but when its run together sometime, a settimer dont work for all players
it will always work if you do it right tho :P

Inside that timer, use a for loop to get all player ids

Код:
for(new i=0; i<=GetMaxPlayers(); i++)
Reply
#5

yes i have that. there is no bug in the timer , just that run together and maybe with +1200 lines for to read Less 1 sc...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)