Mute - Command
#5

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
pawn Код:
CMD:mute(playerid, params[])
{
    if(pInfo[playerid][Admin] >= 1)
    {
        new id,msg1[128],msg2[128];
        new string[200],string2[200];
        if(!sscanf(params, "uS[40]", id))
        {
            if(playerid == id)
            {
              if(IsPlayerConnected(id))
              {
                if(isnull(msg1,msg2))
                {
                   
                    format(string,sizeof(string)," You have been Muted by Admin ( %s ) Reason: No reason specified.",pInfo[playerid][playername]);
                    format(string2,sizeof(string2),"You have muted Player ( %s ) Reason: No reason specified.",pInfo[id][playername]);
                    SendClientMessage(id,COLOR_ADMIN,string);
                    SendClientMessage(playerid,COLOR_ADMIN,string2);
                    Muted[id] = 1;
                } else {
                    format(string,sizeof(string),"AdminCMD: You have been Muted by Admin ( %s ) Reason: %s.",pInfo[playerid][playername],msg1);
                    format(string2,sizeof(string2),"AdminCMD: You have Muted Player ( %s ) Reason: %s.",pInfo[id][playername],msg2);
                    SendClientMessage(id,COLOR_ADMIN,string);
                    SendClientMessage(playerid,COLOR_ADMIN,string2);
                    Muted[id] = 1;
                }
              } else SendError(playerid, "This player is not Connected!");
            } else SendError(playerid, "You can't mute yourself!");
        } else SendError(playerid," Syntax: /Mute <playerid> [reason]");
    } else SendError(playerid," You don't have enough priviliges");
    return 1;
}
Thanks, But i'm still getting the error
pawn Код:
if(pInfo[id][Muted] == 1)
Код:
admin.pwn(74) : error 033: array must be indexed (variable "Muted")
Reply


Messages In This Thread
Mute - Command - by Rudy_ - 27.11.2013, 10:26
Re: Mute - Command - by Ballu Miaa - 27.11.2013, 10:31
Re: Mute - Command - by Konstantinos - 27.11.2013, 10:31
Re: Mute - Command - by Sublime - 27.11.2013, 10:35
Re: Mute - Command - by Rudy_ - 27.11.2013, 10:35
Re: Mute - Command - by Ballu Miaa - 27.11.2013, 10:39
Re: Mute - Command - by Konstantinos - 27.11.2013, 10:39
Re: Mute - Command - by Rudy_ - 27.11.2013, 10:43

Forum Jump:


Users browsing this thread: 1 Guest(s)