How to make!
#1

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(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= && 5)
    {
        new 
countstring[120]; // new variables
        
for(new 0MAX_PLAYERSi++) // 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(playeridunamesizeof(uname)); // this will get the playerid (sender)'s name
        
format(stringsizeof(string), "{FAFF00}[UNMUTED ALL]: %d players have been admin-unmuted by %s (%d)"countunameplayerid); // sets the string to say how many players were unmuted and by who
        
SendClientMessageToAll(0xFFFFFFFFstring); // sends this global message
    
}
    else
        
SendClientMessage(playerid, -1"{FF0000}Error: {FFFFFF}Wrong command!! {FF0000}Check availables commands from here `{FFFFFF}/cmds{FF0000}`.");
    return 
1;

Reply


Messages In This Thread
How to make! - by Man43 - 02.08.2018, 10:20
Re: How to make! - by Man43 - 02.08.2018, 10:52
Re: How to make! - by Banditul18 - 02.08.2018, 10:55
Re: How to make! - by Rufio - 02.08.2018, 11:19

Forum Jump:


Users browsing this thread: 1 Guest(s)