Public feed #527288

Untitled

public text v1 · immutable
Raw Edit
·published 2007-06-01 07:42 UTC
rendered paste body
public OnPlayerText(playerid, text[])

{
if(chat[playerid] == 1)
{

return 1;}
	if(chat[playerid] == 0)
	{
		SendClientMessage(playerid, COLOR_RED, "The Chat has been disabled by an admin");
		return 0;
	}
return 1;}



then On Player Command Text:


if(strcmp(cmd, "/chaton", true) == 0)
{
if ((IsPlayerAdmin(playerid))
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
SendClientMessage(i, COLOR_ORANGE, "The Admin has disabled the Chat.");
chat[i] = 0;
}
}
}
return 1;
}


I have added the new chat[MAX_PLAYERS];