if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 2 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command!");
if(PlayerInfo[playerid][pAdmin] < 2 || PlayerInfo[playerid][pHelper] < 2 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command!");
CMD:nmute(playerid, params[])
{
new pid;
//if(!IsPlayerAdmin(playerid)) return 1;
if(PlayerInfo[playerid][pAdmin] < 2 || PlayerInfo[playerid][pHelper] < 2 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command!");
if(sscanf(params,"u",pid)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /mute [playerid]");
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been muted",name);
SendClientMessageToAll(COLOR_TOMATO,string);
PlayerInfo[pid][pNMuted]= 1;
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command!");
pawn Код:
|
CMD:nooc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 2 && !IsPlayerAdmin(playerid))
{
if(OOCSTAT)
{
OOCSTAT = 0;
SendClientMessageToAll(COLOR_LIGHTBLUE, "OOC Chat has been enabled by an Admin.");
}
else
{
OOCSTAT = 1;
SendClientMessageToAll(COLOR_LIGHTBLUE, "OOC Chat has been disabled by an Admin.");
}
}
else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
return 1;
}
CMD:nooc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
if(OOCSTAT == 1)//You may take a look at this line
{
OOCSTAT = 0;
SendClientMessageToAll(COLOR_LIGHTBLUE, "OOC Chat has been enabled by an Admin.");
}
else
{
OOCSTAT = 1;
SendClientMessageToAll(COLOR_LIGHTBLUE, "OOC Chat has been disabled by an Admin.");
}
return 1;
}