02.08.2018, 10:20
Hi How to I can make If admin level 1 using command /unmuteall and this command only for admins +4level they must send him a message example" This command only for admins +level 4.
PHP код:
CMD:unmuteall(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3 && 5)
{
new count, string[120]; // new variables
for(new i = 0; i < MAX_PLAYERS; i++) // loops all the players one-by-one
{
if(IsPlayerConnected(i)) // checks if the player is connected
{
if(Mute[i] >= 1) // if the looped player has a mute time more than 0
{
count++; // the count will go up
Mute[i] = 0; // and the mute time will be set to 0
}
}
}
new uname[MAX_PLAYER_NAME]; // this is the name of the sender
GetPlayerName(playerid, uname, sizeof(uname)); // this will get the playerid (sender)'s name
format(string, sizeof(string), "{FAFF00}[UNMUTED ALL]: %d players have been admin-unmuted by %s (%d)", count, uname, playerid); // sets the string to say how many players were unmuted and by who
SendClientMessageToAll(0xFFFFFFFF, string); // sends this global message
}
else
SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Wrong command!! {FF0000}Check availables commands from here `{FFFFFF}/cmds{FF0000}`.");
return 1;
}