03.11.2013, 11:55
This might help you : https://sampwiki.blast.hk/wiki/IsPlayerAdmin . It means that if the player has logged in as a rcon admin the command will work. But for more levels you might need to use an enum and I think it will get more complicated then you want.
pawn Код:
CMD:set2(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xDEEE20FF, "You dont have permission for this command!");
GivePlayerWeapon(playerid, 1, 1);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 12, 1);
GivePlayerWeapon(playerid, 16, 10);
GivePlayerWeapon(playerid, 23, 150);
GivePlayerWeapon(playerid, 26, 125);
GivePlayerWeapon(playerid, 32, 200);
GivePlayerWeapon(playerid, 31, 200);
GivePlayerWeapon(playerid, 33, 175);
GivePlayerWeapon(playerid, 37, 1500);
SendClientMessage(playerid, COLOR_YELLOW, "You've been granted weapon set 2!");
return 1;
}