02.08.2013, 00:40
pawn Код:
if(strcmp(cmd, "/h", true) == 0 || strcmp(cmd, "/hc", true) == 0)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode falar no Chat Helper PRESO!");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Vocк nгo pode falar, pois foi calado");
return 1;
}
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/h)elper [helper chat]");
return 1;
}
if(TentouDivulgar(result))
{
if(cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Proibido a divulgaзгo neste servidor!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "HelperAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
ABroadCast(COLOR_YELLOW,string,1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return 1;
}
if (PlayerInfo[playerid][pHelper] >= 1)
{
format(string, sizeof(string), "*%d Helper %s: %s", PlayerInfo[playerid][pHelper], PlayerName(playerid), result);
ABroadCast(COLOR_AZULBB, string, 1);
}
format(string, sizeof(string), "[%d/%d/%d] [%d:%d:%d] *%d Helper %s: %s", v[2], v[1], v[0], v[3], v[4], v[5] , PlayerInfo[playerid][pHelper], sendername, result);
AChatLog(string);
}
return 1;
}
Pois nenhum helper consegue ler o que e escrito no CHAT HELPER!