SA-MP Forums Archive
/cc Clear chat problem - 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 Clear chat problem (/showthread.php?tid=495182)



/cc Clear chat problem - mrxqware - 16.02.2014

Dear Guys,


I don't know how.. but people in my server can use /cc to clear the chatlog, they don't even has to be an admin.
The strange thing is that the command /cc isn't described in my gamemode, includes or filterscript.

I've tried to add my own /cc command in the hope to overrule the other function, but it has no effect.

Does anyone know what to do?

I would like to use /cc as a car chat function and /cleanchat to clear the chatlog.
The cleanchat command works perfectly.

Is /cc a standard function? How can I make a function to overrule it so at least regular player are not able to use it?

It's very strange that at the moment I haven't got the /cc command in my code, but people can use it

Thank you in advance.



Код:
 	if(strcmp(cmd, "/cleanchat", true) == 0)
	{
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] > 2)
            {
                // SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
                // return 1;
            
            for(new i = 0; i < MAX_PLAYERS; i++)
            ClearChatbox(i, 100);
            SendClientMessageToAll(COLOR_LIGHTBLUE, "The chatbox has been cleared by an Administrator!");

			format(string, sizeof(string), "[AdmCmd]: %s has cleared the Chatbox!", sendername);
			ABroadCast(COLOR_YELLOW,string,1);
			new y, m, d;
			new h,mi,s;
			getdate(y,m,d);
			gettime(h,mi,s);
			format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Cleared the Chat",d,m,y,h,mi,s,sendername);
			}else{
				SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
			}
		}
		return 1;
	}



Re: /cc Clear chat problem - Sledgehammer - 16.02.2014

Are you sure that the command '/cc' isn't already defined in your gamemode?

What include's do you have? ZCMD? If you have zcmd try searching for cmd:cc(playerid, params)


Re: /cc Clear chat problem - mrxqware - 17.02.2014

Thanks for the suggestion, but I can't find it. In none of the files. I dont know how