Need help
#8

BUMP!

Can anyone please help me, I've been having this trouble
for the last 3 days or so -.-

Mute and Mutelist :
pawn Код:
CMD:mute(playerid, params[])
{
 new string[96];
 new pname[MAX_PLAYER_NAME];
 new name[MAX_PLAYER_NAME];
 GetPlayerName(playerid, name, sizeof(name));
 if(ainfo[playerid][Level] == 0) return 0;
 if(ainfo[playerid][Level] == 1) return SCM(playerid, Red, "ERROR : Your Admin level is not high enough to use this command!");
 if(sscanf(params, "us", playerid2, treason)){
 SCM(playerid, Orange, "USAGE : /mute [playerid] [reason]");
 SCM(playerid, Lightblue, "FUNCTION : Mutes a particular player. Making him unable to talk");}
 else if(playerid2 == INVALID_PLAYER_ID) SCM(playerid, Red, "ERROR : That player is not connected!");-
 else if(ainfo[playerid][Level] < ainfo[playerid2][Level]) SCM(playerid, Red, "ERROR : You cant mute Higher Leveled Admins!");
 else
 {
 GetPlayerName(playerid2, pname, sizeof(pname));
 format(string, sizeof(string), "SERVER : You have Muted %s Reason : %s", pname, treason);
 SCM(playerid, Lightblue, string);
 format(string, sizeof(string), "SERVER : An Administrator has Muted you!");
 SCM(playerid2, Red, string);
 format(string, sizeof(string), "REASON : %s", treason);
 SCM(playerid2, Blue, string);
 ainfo[playerid2][Muted] = 1;
 GTFP(playerid2, "~g~You have been~n~~w~MUTED!", 3000, 3);
 }
 return 1;
}

CMD:mutelist(playerid, params[])
{
        if(ainfo[playerid][Level] == 0) return 0;
        if(ainfo[playerid][Level] == 1) SCM(playerid, Red, "ERROR : Your Admin level is not high enough to use this command!");
        new count = 0;
        new str[96];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        SendClientMessage(playerid, Red, "Listing Currently Muted Players:");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && ainfo[i][Muted] > 0)
            {
               
                format(str, sizeof(str), "\nPlayer : %s (Player ID : %d)", name, playerid);
                count++;
            }
        }
        if(count != 0)
        {

                SPD(playerid, MUTED, DIALOG_STYLE_MSGBOX, "Muted Player", str, "Done", "Cancel");
        }
        if(count == 0)
        {
            SendClientMessage(playerid, Red, "SERVER : There are no muted players at the moment!");
        }
return 1;
}
Thank you
Reply


Messages In This Thread
Need help - by ViruZZzZ_ChiLLL - 20.06.2010, 13:07
Re: Need help - by ViruZZzZ_ChiLLL - 21.06.2010, 10:59
Re: Need help - by cessil - 21.06.2010, 11:17
Re: Need help - by DJDhan - 21.06.2010, 11:27
Re: Need help - by NewTorran - 21.06.2010, 11:28
Re: Need help - by DJDhan - 21.06.2010, 11:30
Re: Need help - by ViruZZzZ_ChiLLL - 21.06.2010, 11:54
Re: Need help - by ViruZZzZ_ChiLLL - 24.06.2010, 13:23
Re: Need help - by Hiddos - 24.06.2010, 13:28
Re: Need help - by ViruZZzZ_ChiLLL - 25.06.2010, 04:48

Forum Jump:


Users browsing this thread: 1 Guest(s)