04.09.2015, 18:39
Olб pessoas, bom irei ser breve, o BUG й o seguinte, quando eu convido um player para minha organizaзгo o player aceita convite e talz, depois disso ele nasce na hq e tudo sу que a cor do nick fica branca, parece que nгo seta ele pra organizaзгo nгo sei oque fiz de errado, vejam os codes.
pawn Код:
CMD:convidar(playerid, params[]) {
if(PlayerDoSNA[playerid][pLider] < 0 && PlayerDoSNA[playerid][pCargo] != 444 && PlayerDoSNA[playerid][pCargo] != 555)
return SCM(playerid, COR_CINZA, "Vocк nгo й lider/sublider para poder convidar alguйm!");
if(sscanf(params, "u", iddele))
return SCM(playerid, COR_CINZA, "Use: /convidar [nome_sobrenome]");
if(!IsPlayerConnected(iddele))
return SCM(playerid, COR_CINZA, "Esse(a) player nгo estб conectado(a)!");
if(Sequestrado[iddele] == 1)
return SCM(playerid, COR_CINZA, "Vocк nгo pode convidar um membro que esta sendo sequestrado(a), espere o sequestro acabar!");
if(PlayerDoSNA[iddele][pMembro] != 0 || PlayerDoSNA[iddele][pLider] != 0)
return SCM(playerid, COR_CINZA, "Este(a) player jб esta em uma organizaзгo.");
format(String, 153, ""AMARELO"%s "BRANCO2"lhe convidou para ser um "AMARELO"%s\n\n"BRANCO2"Caso deseje aceitar, clique em aceitar!", pNome(playerid), NameOrg[PlayerDoSNA[playerid][pMembro]]);
ShowPlayerDialog(iddele, DConvite, DIALOG_STYLE_MSGBOX, "Convite", String, "Aceitar", "Recusar");
format(corda[playerid], 62, "Vocк convidou %s para sua organizaзгo!", pNome(iddele));
SCM(playerid, COR_AMARELO, corda[playerid]);
SetPVarInt(iddele, "OrgDestino", PlayerDoSNA[playerid][pLider]);
return 1;
}
///////////////////////////////////////
case DConvite:
{
if(!response)
return DeletePVar(playerid, "OrgDestino");
if(response)
{
PlayerDoSNA[playerid][pMembro] = GetPVarInt(playerid, "OrgDestino");
PlayerDoSNA[playerid][pCargo] = 1;
if(GetPVarInt(playerid, "OrgDestino") == 1) { PlayerDoSNA[playerid][pSkin] = 284; SetPlayerColor(playerid, COR_POLICIAPM); }
if(GetPVarInt(playerid, "OrgDestino") == 2) { PlayerDoSNA[playerid][pSkin] = 285; SetPlayerColor(playerid, COR_POLICIABOPE); }
if(GetPVarInt(playerid, "OrgDestino") == 3) { PlayerDoSNA[playerid][pSkin] = 287; SetPlayerColor(playerid, COR_EXERCITO); }
if(GetPVarInt(playerid, "OrgDestino") == 4) { PlayerDoSNA[playerid][pSkin] = 286; SetPlayerColor(playerid, COR_PF); }
if(GetPVarInt(playerid, "OrgDestino") == 5) { PlayerDoSNA[playerid][pSkin] = 163; SetPlayerColor(playerid, COR_GOVERNO); }
if(GetPVarInt(playerid, "OrgDestino") == 6) { PlayerDoSNA[playerid][pSkin] = 102; SetPlayerColor(playerid, COR_BALLAS); }
if(GetPVarInt(playerid, "OrgDestino") == 7) { PlayerDoSNA[playerid][pSkin] = 114; SetPlayerColor(playerid, COR_AZTECA); }
if(GetPVarInt(playerid, "OrgDestino") == 8) { PlayerDoSNA[playerid][pSkin] = 108; SetPlayerColor(playerid, COR_VAGOS); }
if(GetPVarInt(playerid, "OrgDestino") == 9) { PlayerDoSNA[playerid][pSkin] = 30; SetPlayerColor(playerid, COR_PCC); }
if(GetPVarInt(playerid, "OrgDestino") == 10) { PlayerDoSNA[playerid][pSkin] = 170; SetPlayerColor(playerid, COR_CV); }
if(GetPVarInt(playerid, "OrgDestino") == 11) { PlayerDoSNA[playerid][pSkin] = 107; SetPlayerColor(playerid, COR_GROOVE); }
if(GetPVarInt(playerid, "OrgDestino") == 12) { PlayerDoSNA[playerid][pSkin] = 255; SetPlayerColor(playerid, COR_TAXI); }
if(GetPVarInt(playerid, "OrgDestino") == 13) { PlayerDoSNA[playerid][pSkin] = 127; SetPlayerColor(playerid, COR_HITMANS); }
if(GetPVarInt(playerid, "OrgDestino") == 14) { PlayerDoSNA[playerid][pSkin] = 276; SetPlayerColor(playerid, COR_MEDICO); }
if(GetPVarInt(playerid, "OrgDestino") == 15) { PlayerDoSNA[playerid][pSkin] = 188; SetPlayerColor(playerid, COR_REPORTER); }
if(GetPVarInt(playerid, "OrgDestino") == 16) { PlayerDoSNA[playerid][pSkin] = 122; SetPlayerColor(playerid, COR_FARC); }
if(GetPVarInt(playerid, "OrgDestino") == 17) { PlayerDoSNA[playerid][pSkin] = 29; SetPlayerColor(playerid, COR_GI); }
ConvitePlayerOrg(pNome(playerid), GetPVarInt(playerid, "OrgDestino"), 1);
SetPlayerSkin(playerid, PlayerDoSNA[playerid][pSkin]);
pSpawn(playerid);
SCM(InfoOrg[GetPVarInt(playerid, "OrgDestino")][Lider], COR_AMARELO, "O(A) jogador(a) aceitou o convite, agora ele faz parte da sua organizaзгo");
SCM(playerid, COR_AMARELO, ""AMARELO"[INFORMAЗГO]"BRANCO2" Parabйns, agora vocк faz parte de uma organizaзгo, para ver os comandos use /ajudaorg");
KillTimer(podeEquipar[playerid]);
BPEquipar[playerid] = 1;
SetPlayerTeamColor(playerid);
return 1;
}
}