pawn Код:
#include <a_samp>
new Chat;
public OnPlayerText(playerid, text[])
{
if(Chat == 0)
{
return 1;
}
else return 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/ativachat", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
if(Chat == 0)
{
SendClientMessage(playerid, COLOR, "Chat ativado");
Chat = 1;
return 1;
}
else SendClientMessage(playerid, COLOR, "O chat jб estб ativado");
}
else SendClientMessage(playerid, COLOR, " admins only");
return 1;
}
if (strcmp("/desativachat", cmdtext, true, 13) == 0)
{
if(IsPlayerAdmin(playerid))
{
if(Chat == 1)
{
SendClientMessageToAll(COLOR, "Chat desativado");
Chat = 0;
return 1;
}
else SendClientMessage(playerid, COLOR, "O chat jб estб desativado");
}
else SendClientMessage(playerid, COLOR, " admins only ");
return 1;
}
return 0;
}