28.09.2018, 17:36
This:
Or this:
Which of the 2 methods is best?
Код:
new Function[MAX_PLAYERS]; forward MyFirstPublic(params); public MyFirstPublic(params){ switch(Function[params]){ case 0: //Code case 1: //Code case 2: //Code case 3: //Code //etc... }} //reference Function[playerid] = 0, MyFirstPublic(playerid); Function[playerid] = 1, SetTimerEx("MyFirstPublic",3000,false,"i",playerid);
Код:
forward MyFirstPublic(params); public MyFirstPublic(params) { SetTimerEx("MySecondPublic",3000,false,"i",params); } forward MySecondPublic(params); public MySecondPublic(params) { SetTimerEx("MyThirdPublic",3000,false,"i",params); } forward MyThirdPublic(params); public MyThirdPublic(params) { //Code... } //Reference: SetTimerEx("MyFirstPublic",3000,false,"i",playerid);