Mutear
#1

Hola, me podrнa decir como hago, para que estй comando sea asi, /mutear ID tiempo razуn, porque lo normal siempre se mutea 5 minutos, gracias.


pawn Код:
zcmd(mutear, playerid, params[])
    {
       new giveplayerid;
        if(Info[playerid][pAdminZC] < 1 &&Info[playerid][pHelper] < 1) return SendClientMessageEx(playerid, COLOR_GRAD2, "ЎNo puedes usar este comando!");
       if(!sscanf(params, "d", giveplayerid))
       {
           if(!IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Esa ID es invбlida.");
             if(Info[giveplayerid][pAdminZC] >= 1)
          {
             return SendClientMessageEx(playerid, COLOR_LIGHTRED, "No puedes mutear a administradores.");
          }
           if(Info[giveplayerid][pNMute] == 0)
          {
              new string[128];
                Info[giveplayerid][pNMute] = 1;
                NewbieTimer[giveplayerid] = 3000;
                Info[giveplayerid][pNMuteTotal]++;
             if(Info[giveplayerid][pNMuteTotal] == 30)
             {
                format(string, sizeof(string), "%s fue kickeado automбticamente. Razуn: 30 muteos en total.", GetPlayerNameEx(giveplayerid));
                BroadCast(COLOR_RED,string);
                Kick(giveplayerid);
                return 1;
             }
             format(string, sizeof(string), "%s te ha silenciado del canal de ayuda por 5 minutos, razуn: Mal uso.", GetPlayerNameEx(playerid));
             SendClientMessageEx(giveplayerid,COLOR_WHITE,string);
             Info[playerid][pAccount]-= 6000;
             SendClientMessageEx(playerid, COLOR_GRAD2, "Se te ha descontado 6000$ de tu cuenta bancaria.");
             foreach(Player, n)
             {
                if (gNewbie[n] == 0 || Info[n][pNMute] == 0)
                {
                    format(string, sizeof(string), "A %s no se le permite hablar en el chat de ayuda. Razуn: Mal uso.", GetPlayerNameEx(giveplayerid));
                   SendClientMessageEx(n, COLOR_RED, string);
                }
             }
             SetTimerEx("NewbieUnMuted", 300000, 0, "d", giveplayerid);
          }
       } else SendClientMessageEx(playerid, COLOR_GRAD2, "Utiliza: {6E9AFF}/mutear{FFFFFF} <PlayerID>");
       return 1;
    }
pawn Код:
function NewbieUnMuted(playerid)
{
    Info[playerid][pNMute] = 0;
    SendClientMessage(playerid, COLOR_WHITE, "Ahora ya no estas silenciado del canal de ayuda recuerda usarlo sуlo para preguntas.");
    SendClientMessage(playerid, COLOR_WHITE, "Si sigues recuerda que puedes resultar baneado automбticamente del servidor.");
    return 1;
}
Reply


Messages In This Thread
Mutear - by Metzone - 06.09.2014, 21:16
Respuesta: Mutear - by [J]ulian - 06.09.2014, 21:28

Forum Jump:


Users browsing this thread: 1 Guest(s)