/cc Clear chat problem
#1

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;
	}
Reply
#2

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)
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)