28.08.2012, 10:03
I think you are trying, for example, to limit a command that is in a filer script to admin level 2 for example.
Than, yes, you can put the enum in the filter script, with same variables as LuxAdmin, so than you can limit it in the filter script.
Example:
Than, yes, you can put the enum in the filter script, with same variables as LuxAdmin, so than you can limit it in the filter script.
Example:
pawn Code:
//In GM you have:
enum pInfo
{
AdminLevel,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
//Than you make a cmd only for admins:
CMD:hi(playerid, params[])
{
if(PlayrINfo[playerid][AdminLevel] < 2) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not admin level 2.");
SendClientMessage(playerid, 0xFFFFFFFF, "Hiiiiiiiiiiii");
return 1;
}
//Than, you can make this in the filer script too...
enum pInfo
{
AdminLevel,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
CMD:hoiiii(playerid, params[])
{
if(PlayrINfo[playerid][AdminLevel] < 2) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not admin level 2.");
SendClientMessage(playerid, 0xFFFFFFFF, "Hoiiiiiiii");
return 1;
}
//It's exactly same thing.