cuddly-table-7819
03/26/2023, 10:04 PMc++
// GameModeInit
SetTimer("FuncThatLoopForAllPlayers1", 250, true);
SetTimer("FuncThatLoopForAllPlayers2", 1000, true);
SetTimer("FuncThatLoopForAllPlayers3", 1250, true);
// example function
public FuncThatLoopForAllPlayers1() {
foreach(new i : Player) {
if(Logged[i] > 0)
{
// do func stuff
}
}
}
or
c++
// GameModeInit
for(new i = 0; i < MAX_PLAYERS; ++i) {
SetTimerEx("FuncThatRecivePlayerIdAsParameter1", 250, true, "i", i);
SetTimerEx("FuncThatRecivePlayerIdAsParameter2", 1000, true, "i", i);
SetTimerEx("FuncThatRecivePlayerIdAsParameter3", 1250, true, "i", i);
}
// example function
public FuncThatRecivePlayerIdAsParameter1(i) {
if(Logged[i] > 0)
{
// do func stuff
}
}