[AJUDA] /ativarchat -
ProcessFail - 21.09.2011
Pessoal uso esse CMD no meu GM sу que ultimamente ele estб meio estranho (temperamental '-' )
QUando desativo o chat e ativo depois, do nada ele bloqueia o chat, mas nem manda msg dizendo "Chat desativado" apenas bloqueia, dai novamente tenho que usar o /ativarchat
PHP код:
if(strcmp(cmd, "/ativarchat", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i, tcadm, "* Chat ativado!");
chat[i] = false;
}
}
}
return 1;
}
}
if(strcmp(cmd, "/desativarchat", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i, tcadm, "* Chat desativado!");
chat[i] = true;
}
}
}
Re: [AJUDA] /ativarchat -
Dolby - 21.09.2011
Manda o OnPlayerText e essa parte de "chat"
Re: [AJUDA] /ativarchat -
ProcessFail - 21.09.2011
Quote:
Originally Posted by Gustavo_Araujo
Manda o OnPlayerText e essa parte de "chat"
|
Nвo sei se seria isso aqui, й o que tem no onPlayer
PHP код:
if(chat[i] == true)
{
SendClientMessage(playerid, 0xFF0000AA, "(ERRO) O Chat estб desativado!");
return 0;
}
Re: [AJUDA] /ativarchat -
WLSF - 21.09.2011
Comando:
pawn Код:
if(strcmp(cmd, "/ativarchat", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 4 || pAdmin[playerid] == 5)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i, tcadm, "* Chat ativado!");
chat[i] = 1;
}
}
}
return 1;
}
if(strcmp(cmd, "/desativarchat", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 4 || pAdmin[playerid] == 5)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i, tcadm, "* Chat desativado!");
chat[i] = 0;
}
}
}
return 1;
}
OnPlayerText:
pawn Код:
if(chat[i] == 0)
{
SendClientMessage(playerid, 0xFF0000AA, "(ERRO) O Chat estб desativado!");
return 0;
}
Tente assim, nгo sei se vai fazer muito efeito.
Re: [AJUDA] /ativarchat -
[O.z]Caroline - 21.09.2011
no topo:
no comando para ligar o chat:
para desligar o chat:
no OnPlayerText
pawn Код:
if(chat == true) return SendClientMessage(playerid, -1,"Chat destivado");