22/09/2022 17:19
(22/09/2022 16:59)Dr Editor Escreveu: Seria mais ou menos isso.
Código:#include <a_samp>
#include <zcmd>
#include <foreach>
new bool:chatOff[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
chatOff[playerid] = true;
return 1;
}
public OnPlayerText(playerid, text[])
{
foreach(new i : Player)
{
if(!chatOff[i])
continue;
SendClientMessage(i, -1, text);
}
return 0;
}
CMD:chat(playerid, params[])
{
chatOff[playerid] = !chatOff[playerid];
new string[40];
format(string, sizeof string, "[INFO] Chat %s", chatOff[playerid] ? ("ativado") : ("desativado"));
SendClientMessage(playerid,-1, string);
return 1;
}
perfeito vlw mn .