11.08.2013, 01:23
Aparece Unknown command. apуs digitar o comando /ang olhe o print !
CODIGO
CODIGO
PHP код:
if(strcmp(cmd, "/anunciogang", true) == 0 || strcmp(cmd, "/ang", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerOrg(playerid) == 5 || GetPlayerOrg(playerid) == 6 || GetPlayerOrg(playerid) == 7 || GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 9 || GetPlayerOrg(playerid) == 10 || GetPlayerOrg(playerid) == 12 || GetPlayerOrg(playerid) == 13 || GetPlayerOrg(playerid) == 14
|| GetPlayerOrg(playerid) == 15 || GetPlayerOrg(playerid) == 17 || GetPlayerOrg(playerid) == 18 || GetPlayerOrg(playerid) == 19 || GetPlayerOrg(playerid) == 20 || GetPlayerOrg(playerid) == 21)
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "Voce precisa ter pelo menos cargo 4 para usar este comando!");
return 1;
}
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COR_VAGOS," Vocк nгo pode mandar anuncios preso!");
return 1;
}
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: (/ang) ou (/anunciogang) [texto]");
return 1;
}
if(TentouDivulgar(result))
{
if(cdivulgar[playerid] >= 6)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Cuidado, Poderб ser banido.");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Evite digitar muitos nъmeros consecutivos.");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
ABroadCast(COLOR_YELLOW,string,1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return 1;
}
if(panunciogang == 1)
{
SendClientMessage(playerid,COLOR_GRAD2,"Espere 30 segundos para poder anunciar novamente!");
return 1;
}
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
format(string,sizeof(string),"[%s] Anuncio: %s Jogador: %s[%d] - Cel:(%d)",NomeORG(playerid),result,sendername,playerid,PlayerInfo[playerid][pPnumber]);
if(GetPlayerOrg(playerid) == 5) SendClientMessageToAll(COR_AZTECAS, string);
else if(GetPlayerOrg(playerid) == 6) SendClientMessageToAll(COR_TAL, string);
else if(GetPlayerOrg(playerid) == 7) SendClientMessageToAll(COR_PRE, string);
else if(GetPlayerOrg(playerid) == 8) SendClientMessageToAll(COR_HITMAN, string);
else if(GetPlayerOrg(playerid) == 9) SendClientMessageToAll(COR_REP, string);
else if(GetPlayerOrg(playerid) == 10) SendClientMessageToAll(COR_TAXI, string);
else if(GetPlayerOrg(playerid) == 12) SendClientMessageToAll(COR_COSA, string);
else if(GetPlayerOrg(playerid) == 13) SendClientMessageToAll(COR_YAK, string);
else if(GetPlayerOrg(playerid) == 14) SendClientMessageToAll(COR_GRO, string);
else if(GetPlayerOrg(playerid) == 15) SendClientMessageToAll(COR_AL, string);
else if(GetPlayerOrg(playerid) == 17) SendClientMessageToAll(COR_BALLAS, string);
else if(GetPlayerOrg(playerid) == 18) SendClientMessageToAll(COR_VAGOS, string);
else if(GetPlayerOrg(playerid) == 19) SendClientMessageToAll(COR_COMANDOVERMELHO, string);
else if(GetPlayerOrg(playerid) == 20) SendClientMessageToAll(COR_PCC, string);
else if(GetPlayerOrg(playerid) == 21) SendClientMessageToAll(COR_SOCIOO, string);
print(string);
SBizzInfo[3][sbTill] += 100;
ExtortionSBiz(4, 100);
panunciogang = 1;
SetTimer("AnuncioGang", 30000, 0);
}
}
return 1;
}