pawn Код:
CMD:setlevel(playerid,params[])
{
new target,level,string[124],PlayerName[24];
if(sscanf(params,"ud",target,level)) return SendClientMessage(playerid,-1,"USAGE:/setlevel [playerid] [level]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"ERROR:Player not connected.");
if(level < 0 || level > 3) return SendClientMessage(playerid,-1,"ERROR:Invalid level. (1,2,3)");
GetPlayerName(target,PlayerName,sizeof(PlayerName));
format(string,sizeof(string),"%s has been made a level %d admin!",PlayerName,level);
SendClientMessageToAll(-1,string);
pInfo[playerid][pAdminLevel] = level;
return 1;
}
CMD:setviplevel(playerid,params[])
{
new target,level,string[124],PlayerName[24];
if(sscanf(params,"ud",target,level)) return SendClientMessage(playerid,-1,"USAGE:/seviplevel [playerid][level]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"ERROR:Player not connected.");
if(level < 0 || level > 1) return SendClientMessage(playerid,-1,"ERROR:Invalid level.(1 one only)");
GetPlayerName(target,PlayerName,sizeof(PlayerName));
format(string,sizeof(string),"%s has been made a level %d VIP",PlayerName,level);
pInfo[playerid][pVIPLevel] = level;
return 1;
}