30.01.2011, 16:30
You need to put the rank checks in the commands with a return like
But I like this methode, so the unqualified people get a Unknown Command error
pawn Код:
if(strcmp(cmdtext, "/gotos", true) == 0)
{
if(AccountInfo[playerid][aLevel] <= 0)
return SendClientMessage(playerid, COLOR_RED, "You need to be a Helper to use gotos command!");
SetPlayerPos(playerid, -1470.45617676,2611.21215820,59.36460875);
SendClientMessage(playerid,red, "Welcome to Staff Base.");
return 1;
}
pawn Код:
if(AccountInfo[playerid][aLevel] > 0)
{
if(strcmp(cmdtext, "/gotos", true) == 0)
{
SetPlayerPos(playerid, -1470.45617676,2611.21215820,59.36460875);
SendClientMessage(playerid,red, "Welcome to Staff Base.");
return 1;
}
if(strcmp(cmdtext, "/agateo", true)==0)
{
SendClientMessage(playerid, COLOR_RED, "You have opened the staff gate!");
MoveObject(agate, -1481.26208496,2660.61840820,48, 3);
return 1;
}
if(strcmp(cmdtext, "/agatec", true)==0)
{
SendClientMessage(playerid, COLOR_RED, "You have closed the staff gate!");
MoveObject(agate, -1481.26208496,2660.61840820,56.58593750, 3);
return 1;
}
}

