komanda /cc


Započeo Goku ^, April 25, 2021, 07:12:36 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning):Ocu da napravim da kad admin/gm ukuca komandu /cc da se obrise chat samo igracima a clanovima staff teama ne
Dio skripte: E sad ja sam pokusavao dole kod OcistiChat stavljao sam if(PlayerInfo[pAdmin] >= 1 || PlayerInfo[pTA] >= 1 || PlayerInfo[pGM] >= 1) ali nece ni da obrise onda ni igracima ni clanovima staffa.
////////////////////////////////////// KOMANDA /CC /////////////////////////////////
CMD:cc(playerid, params[])
{
    if(PlayerInfo[playerid][pGM] == 0 && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pTA] == 0) return SCM(playerid,NS_ORANGE, "* Niste ovlasceni za upotrebu ove komande.");
    if(GetTimeEx() < cctime) return SCM(playerid,NS_ORANGE, "* Chat se moze brisati svakih 30 sekundi.");
    new buffer[128];
    OcistiChat( playerid, 50);
    GetPlayerName(playerid, buffer, MAX_PLAYER_NAME + 1);
    format(buffer, sizeof buffer, "Chat box ociscen od strane %s %s.", PlayerInfo[playerid][pImeRanka], buffer);
    SendClientMessageToAll(NS_ORANGE, buffer);
   cctime = GetTimeEx() + 30;
   return 1;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////// CISCENJE I OSTALO /////////////////////////////////
forward OcistiChat(playerid, lines);
public OcistiChat(playerid, lines)
{
   for(new i = 0; i < lines; i++)
   {
      Ciscenje(playerid, -1, "");
   }
   return 1;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
Poslednja Izmena: April 25, 2021, 19:22:43 POSLE PODNE od M Ө M Σ N Z I

evo ti ovo Preuzmi
i ubacis u gamemodes folder, tjs scriptu, to su dvije komande, clear i clearall, clear je za igrace a clearall za admine i sve, mislim da ce ti to posluziti ;)
takodje ima igrac svoju komandu da ocisti sebi chat chatclear.self
Poslednja Izmena: April 25, 2021, 10:31:36 PRE PODNE od DavidScript
Graphic Designer - Contact info
davidmarkovic628@gmail.com
https://markovicdesigns.carrd.co/

YCMD:cc(playerid, const params[], help)
{
    foreach (new i: Player) {
        if (!char_Admin[i]) {
            for (new j = 0; j < 60; ++j) {
                SendClientMessage(i, -1, " ");
            }
        }

        SendClientMessageToAll(-1, "Chat cleared.");
    }

    return COMMAND_OK;
}


char_Admin ovo samo prilagodi sebi..