26.12.2010, 12:57
Eu estou com um bug no cmd /convidar eu convido a pessoa para minha org/gg ai aparece "Vocк nгo estб autorizado a ultilizar este comando" mais antes o comando estava funcionando. Segue abaixo o cmd
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /convidar [playerid/Parte-do-Nick]");
return 1;
}
new para1;
new ftextt[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[para1][pMembro] == 0)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMembro] >= 0)
{
if(PlayerInfo[playerid][pLeader] == 1) { ftextt = "Polнcia Militar"; }
else if(PlayerInfo[playerid][pLeader] == 2) { ftextt = "Polнcia Federal"; }
else if(PlayerInfo[playerid][pLeader] == 0) { ftextt = "Civil"; }
else if(PlayerInfo[playerid][pLeader] == 3) { ftextt = "Forзas Armadas"; }
else if(PlayerInfo[playerid][pLeader] == 4) { ftextt = "Emergкncias."; }
else if(PlayerInfo[playerid][pLeader] == 5) { ftextt = "Ballas Gang"; }
else if(PlayerInfo[playerid][pLeader] == 6) { ftextt = "Groove Street"; }
else if(PlayerInfo[playerid][pLeader] == 7) { ftextt = "Polнtico"; }
else if(PlayerInfo[playerid][pLeader] == { ftextt = "Assassino"; }
else if(PlayerInfo[playerid][pLeader] == 9) { ftextt = "Repуrter"; }
else if(PlayerInfo[playerid][pLeader] == 11) { ftextt = "Instrutor"; }
else if(PlayerInfo[playerid][pLeader] == 12) { ftextt = "Los Vagos"; }
else if(PlayerInfo[playerid][pLeader] == 13) { ftextt = "Motoqueiros"; }
else if(PlayerInfo[playerid][pLeader] == 14) { ftextt = "Policia Rodoviбria"; }
else if(PlayerInfo[playerid][pLeader] == 15) { ftextt = "Los Aztecas"; }
else if(PlayerInfo[playerid][pLeader] == 16) { ftextt = "Triads"; }
else if(PlayerInfo[playerid][pLeader] == 17) { ftextt = "Yakuza"; }
else if(PlayerInfo[playerid][pLeader] == 1 { ftextt = "Terroristas"; }
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
printf("Adm: %s convidou %s para entrar no grupo dos: '%s'", sendername, giveplayer, ftextt);
format(string, sizeof(string), "* Vocк recebeu um convite para entrar na profissгo '%s' (digite /aceitar convite) para aceitar.", ftextt, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Vocк convidou %s para sua profissгo '%s'.", giveplayer,ftextt);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Invite[para1] = 1;
InviteOffer[para1] = playerid;
InviteJob[para1] = PlayerInfo[playerid][pLeader];
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a ultilizar este comando !");
}
}
return 1;
}
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /convidar [playerid/Parte-do-Nick]");
return 1;
}
new para1;
new ftextt[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[para1][pMembro] == 0)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMembro] >= 0)
{
if(PlayerInfo[playerid][pLeader] == 1) { ftextt = "Polнcia Militar"; }
else if(PlayerInfo[playerid][pLeader] == 2) { ftextt = "Polнcia Federal"; }
else if(PlayerInfo[playerid][pLeader] == 0) { ftextt = "Civil"; }
else if(PlayerInfo[playerid][pLeader] == 3) { ftextt = "Forзas Armadas"; }
else if(PlayerInfo[playerid][pLeader] == 4) { ftextt = "Emergкncias."; }
else if(PlayerInfo[playerid][pLeader] == 5) { ftextt = "Ballas Gang"; }
else if(PlayerInfo[playerid][pLeader] == 6) { ftextt = "Groove Street"; }
else if(PlayerInfo[playerid][pLeader] == 7) { ftextt = "Polнtico"; }
else if(PlayerInfo[playerid][pLeader] == { ftextt = "Assassino"; }
else if(PlayerInfo[playerid][pLeader] == 9) { ftextt = "Repуrter"; }
else if(PlayerInfo[playerid][pLeader] == 11) { ftextt = "Instrutor"; }
else if(PlayerInfo[playerid][pLeader] == 12) { ftextt = "Los Vagos"; }
else if(PlayerInfo[playerid][pLeader] == 13) { ftextt = "Motoqueiros"; }
else if(PlayerInfo[playerid][pLeader] == 14) { ftextt = "Policia Rodoviбria"; }
else if(PlayerInfo[playerid][pLeader] == 15) { ftextt = "Los Aztecas"; }
else if(PlayerInfo[playerid][pLeader] == 16) { ftextt = "Triads"; }
else if(PlayerInfo[playerid][pLeader] == 17) { ftextt = "Yakuza"; }
else if(PlayerInfo[playerid][pLeader] == 1 { ftextt = "Terroristas"; }
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
printf("Adm: %s convidou %s para entrar no grupo dos: '%s'", sendername, giveplayer, ftextt);
format(string, sizeof(string), "* Vocк recebeu um convite para entrar na profissгo '%s' (digite /aceitar convite) para aceitar.", ftextt, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Vocк convidou %s para sua profissгo '%s'.", giveplayer,ftextt);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Invite[para1] = 1;
InviteOffer[para1] = playerid;
InviteJob[para1] = PlayerInfo[playerid][pLeader];
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a ultilizar este comando !");
}
}
return 1;
}