Rcon chat on command - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Rcon chat on command (
/showthread.php?tid=111196)
Rcon chat on command -
jaksimaksi - 30.11.2009
Hi, i have rcon chat off command, but now i need command who turns on chat, can someone can share it? ;>
Re: Rcon chat on command -
[GM]The_Don - 30.11.2009
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
Re: Rcon chat on command -
jaksimaksi - 01.12.2009
Код:
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
Re: Rcon chat on command -
Luka P. - 01.12.2009
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;
}