SA-MP Forums Archive
/cc question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /cc question (/showthread.php?tid=383356)



/cc question - Rapk1d - 07.10.2012

How cand i do , /cc when execute the command , the chat of admin and helpers to remain , and at players/newbie to delete it ?

Sorry for my bad english.


Код:
    if(strcmp(cmd, "/cc", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
			{
                ClearChatboxToAll(playerid,100);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "XGamminG RPG: %s a sters chatul", sendername);
                SendClientMessageToAll(COLOR_LIGHTRED, string);
                //SendClientMessage(playerid,0x70AD52FF, "Chatul a fost sters cu succes!");
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "You're not a Admin so you cannot use this command!");
				return 1;
			}
		}
	}



Re: /cc question - JaKe Elite - 07.10.2012

pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1 || PlayerInfo[playerid][pHelper] <= 1)
{
    ClearChatboxToAll(playerid,100);
}



Re: /cc question - Rapk1d - 07.10.2012

works at /cnc but at /cc it's same