How is better? Consume less memory.
#1

This:

Код:
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);
Or this:

Код:
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);
Which of the 2 methods is best?
Reply


Messages In This Thread
How is better? Consume less memory. - by Alteh - 28.09.2018, 17:36
Re: How is better? Consume less memory. - by v1k1nG - 28.09.2018, 17:41
Re: How is better? Consume less memory. - by NaS - 28.09.2018, 17:41

Forum Jump:


Users browsing this thread: 1 Guest(s)