07.06.2011, 23:57
Bom, faz um bom tempo que nгo venho aqui encher o saco de vcs rsrsrs mais dessa vez eu nгo estou achando o bug, й sobre o comando /faccao no meu GM TDM, ele nгo executa a operaзгo, me ajudem por favor, tai o comando e a public SendFamilyMessage abaixo:
para quem nгo entendeu o que eu disse vou explicar melhor: eu digito /f ''texto'' ele nгo executa, ou seja, nгo envia a mensagem, espero a resposta de vcs ai valeu.
pawn Код:
if(strcmp(cmd, "/faccao", true) == 0 || strcmp(cmd, "/f", true) == 0)
{
if(IsPlayerConnected(playerid) == 1)
{
if(mute[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Vocк nгo pode falar por que foi silenciado");
return 1;
}
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_GREEN, "USE: (/f)accao [texto]");
return 1;
}
if (PlayerInfo[playerid][pMember] >= 1)
{
if(PlayerInfo[playerid][pMember] == 1)//groove
{
format(string, sizeof(string), "** (( Groove Street %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(PlayerInfo[playerid][pMember] == 2)//ballas
{
format(string, sizeof(string), "** (( Ballas %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(PlayerInfo[playerid][pMember] == 3)//vagos
{
format(string, sizeof(string), "** (( Vagos %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(PlayerInfo[playerid][pMember] == 4)//CV
{
format(string, sizeof(string), "** (( Comando Vermelho %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(PlayerInfo[playerid][pMember] == 5)//PCC
{
format(string, sizeof(string), "** (( PCC %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(PlayerInfo[playerid][pMember] == 6)//Aztecas
{
format(string, sizeof(string), "** (( Azteca %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(PlayerInfo[playerid][pMember] == 7)//cops
{
format(string, sizeof(string), "** (( Polнcia %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREEN, " Vocк nгo faz parte de uma Facзгo !");
return 1;
}
}//not connected
return 1;
}
public SendFamilyMessage(family, color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
if(PlayerInfo[i][pMember] == family)
{
if(!gFam[i])
{
SendClientMessage(i, color, string);
}
}
}
}
}