Rcon chat on command
#1

Hi, i have rcon chat off command, but now i need command who turns on chat, can someone can share it? ;>
Reply
#2

Why dont you just show us your Script to Turn the Chat off, so we have kind of an idea what we may need to do, to help you out
Reply
#3

Код:
OnGameModeinit:
	DisableChat = false;

public OnPlayerText(playerid, text[])
{
if(DisableChat == true)
return 0;

	if(!strcmp(cmdtext,"/offchat",true,7))
	{
		if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_LRED, "You are not administrator");
  	for(new i; i < MAX_PLAYERS; i++)
DisableChat = true;
    new string[256];
  format(string, sizeof(string), "Chat is turned off");
  SendClientMessageToAll(COLOR_GOLDEN, string);
  return 1;
  }
This is the command, i need now command who turns on chat
Reply
#4

Commands using zcmd

pawn Код:
new bool: EnableChat = true;
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(EnableChat == false) return 0;
    return 1;
}
pawn Код:
command(chat, playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You are not an administrator!");

    switch(EnableChat)
    {
        case false:
        {
             EnableChat = true;
             SendClientMessageToAll(COLOR_GOLDEN, "INFO: Chat is turned on.");
        }
        case true:
        {
             EnableChat = false;
             SendClientMessageToAll(COLOR_GOLDEN, "INFO: Chat is turned off.");
        }
     }
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)