03.10.2015, 12:40
I'm not sure if you do that will make a difference in the speed of the code.
It is not necessary, however you can save space and lines you making something like this
The three lines in the function reset variables will make all the work restart all the variables of enumeration(playerid).
It is not necessary, however you can save space and lines you making something like this
PHP код:
#include <a_samp>
enum myenum
{
PlayerCuffed,
PlayerCuffedTime,
RegistrationStep
};
new Player[MAX_PLAYERS][myenum];
ResetVariables(playerid)
{
for(new myenum:i; i < myenum; i++)
{
Player[playerid][i] = 0;
}
return 1;
}
public OnPlayerConnect(playerid)
{
ResetVariables(playerid);
return 1;
}