08.02.2016, 22:28
I reckon that a constant array is shorter, still. But I don't know if it will actually be faster.
Still, it is good that repeated code is being denounced.
PHP Code:
// global
new const gAdminLevel[][] = {
"None", // 0
"Mod", // 1
"Support", // 2
"Admin" // 3
};
PHP Code:
//where ever
new string[64];
format(string,sizeof(string),"You`re: %s", gAdminLevel[PlayerInfo[playerid][pAdmin]]);
SendClientMessage(playerid, YOUR_COLOR, string);
