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;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
evo ti ovo Preuzmi (https://umod.org/plugins/ChatClear.cs)
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
[pawn]
YCMD:cc(playerid, const params[], help)
{
foreach (new i: Player) {
if (!char_Admin) {
for (new j = 0; j < 60; ++j) {
SendClientMessage(i, -1, " ");
}
}
SendClientMessageToAll(-1, "Chat cleared.");
}
return COMMAND_OK;
}
[/pawn]
char_Admin ovo samo prilagodi sebi..