19.04.2015, 14:56
eu num sei que ta dando quando eu convido o boneco n anda e se anda vlta pro lugar ! oque falta sera ?
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte-do-Nick]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pCargo] >= 5)
{
new lolz = GetPlayerOrg(playerid);
if(TemVaga(lolz) == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvaga primeiro.");
return 1;
}
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pMembro] != 0 || PlayerInfo[para1][pLider] != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Este player jб participa de Org/Gang/Mafia.");
return 1;
}
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s te convidou para entrar para: %s (digite /aceitar convite) para aceitar.", PlayerName(playerid), NomeORG(playerid));
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Vocк convidou %s para sua organizaзгo: %s.", giveplayer,NomeORG(playerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
InviteOffer[para1] = playerid;
InviteJob[para1] = lolz;
format(strRockstar,sizeof(strRockstar), "{00FFFF}Vocк foi Convidado para a Organizaзгo: %s!\n{FF8000}Deseja Entrar para esta Organizaзгo?\n{0080FF}Se vocк Quiser Entrar Aperte em '{00FFFF}Sim{0080FF}'\n{0080FF}Se nгo Quiser Aperte em '{00FFFF}Nгo{0080FF}'",NomeORG(playerid));
ShowPlayerDialog(para1,642,DIALOG_STYLE_MSGBOX,"Convite",strRockstar,"Sim","Nao");
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Somente lнderes e Sub lideres podem usar este comando !");
}
}
return 1;
}
if(strcmp(cmd,"/aceitar",true)==0)
{
if(IsPlayerConnected(playerid))
{
new x_Emprego[32];
x_Emprego = strtok(cmdtext, idx);
if(!strlen(x_Emprego)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Aceitar __________________|");
SendClientMessage(playerid, COLOR_WHITE, "Use: aceitar [nome]");
SendClientMessage(playerid, COLOR_GREY, "Nomes Validos: Transa, drogas, Reparo, Advogado, seguranзa, emprego, aovivo, Refill , Assalto");
SendClientMessage(playerid, COLOR_GREY, "Nomes Validos: Carro, Taxi, Onibus, Boxe, Medico, Mecanico, Multa ,divorcio, mendigo, convite");
return 1;
}
if(strcmp(x_Emprego,"convite",true) == 0)
{
if(InviteOffer[playerid] < 999)
{
if(IsPlayerConnected(InviteOffer[playerid]))
{
if(PlayerInfo[InviteOffer[playerid]][pLider] != 0)
{
if(PlayerInfo[InviteOffer[playerid]][pLider] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ChosenSkin[playerid] = 282; SetPlayerSkin(playerid, 282); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ChosenSkin[playerid] = 285; SetPlayerSkin(playerid, 285); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ChosenSkin[playerid] = 279; SetPlayerSkin(playerid, 279); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 5) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ChosenSkin[playerid] = 114; SetPlayerSkin(playerid, 114); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 6) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ChosenSkin[playerid] = 121; SetPlayerSkin(playerid, 121); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 7) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ChosenSkin[playerid] = 163; SetPlayerSkin(playerid, 163); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 8) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 9) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 148; SetPlayerSkin(playerid, 148); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 10) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 253; SetPlayerSkin(playerid, 253); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 11) { PlayerInfo[playerid][pTeam] = 25; gTeam[playerid] = 2; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 12) { PlayerInfo[playerid][pTeam] = 22; gTeam[playerid] = 12; ChosenSkin[playerid] = 126; SetPlayerSkin(playerid, 126); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 13) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 203; SetPlayerSkin(playerid, 203); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 14) { PlayerInfo[playerid][pTeam] = 15; gTeam[playerid] = 12; ChosenSkin[playerid] = 107; SetPlayerSkin(playerid, 107); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 15) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 17; ChosenSkin[playerid] = 30; SetPlayerSkin(playerid, 30); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 16) { PlayerInfo[playerid][pTeam] = 25; gTeam[playerid] = 2; ChosenSkin[playerid] = 59; SetPlayerSkin(playerid, 59); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 17) { PlayerInfo[playerid][pTeam] = 18; gTeam[playerid] = 12; ChosenSkin[playerid] = 103; SetPlayerSkin(playerid, 103); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 18) { PlayerInfo[playerid][pTeam] = 19; gTeam[playerid] = 12; ChosenSkin[playerid] = 109; SetPlayerSkin(playerid, 109); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 19) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 40; SetPlayerSkin(playerid, 40); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 20) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 47; SetPlayerSkin(playerid, 47); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 21) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 247; SetPlayerSkin(playerid, 247); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 22) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 181; SetPlayerSkin(playerid, 181); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 23) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ChosenSkin[playerid] = 101; SetPlayerSkin(playerid, 101); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 24) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 25) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 101; SetPlayerSkin(playerid, 29); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 26) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 20; ChosenSkin[playerid] = 230; SetPlayerSkin(playerid, 230); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 27) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 20; ChosenSkin[playerid] = 230; SetPlayerSkin(playerid, 230); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 28) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 20; ChosenSkin[playerid] = 137; SetPlayerSkin(playerid, 137); }
else if(PlayerInfo[InviteOffer[playerid]][pLider] == 29) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 20; ChosenSkin[playerid] = 133; SetPlayerSkin(playerid, 133); }
}
else
{
if(PlayerInfo[InviteOffer[playerid]][pMembro] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ChosenSkin[playerid] = 282; SetPlayerSkin(playerid, 282); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ChosenSkin[playerid] = 285; SetPlayerSkin(playerid, 285); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ChosenSkin[playerid] = 279; SetPlayerSkin(playerid, 279); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 5) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ChosenSkin[playerid] = 114; SetPlayerSkin(playerid, 114); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 6) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ChosenSkin[playerid] = 121; SetPlayerSkin(playerid, 121); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 7) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ChosenSkin[playerid] = 163; SetPlayerSkin(playerid, 163); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 8) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 9) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 148; SetPlayerSkin(playerid, 148); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 10) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 253; SetPlayerSkin(playerid, 253); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 11) { PlayerInfo[playerid][pTeam] = 25; gTeam[playerid] = 2; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 12) { PlayerInfo[playerid][pTeam] = 22; gTeam[playerid] = 12; ChosenSkin[playerid] = 126; SetPlayerSkin(playerid, 126); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 13) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 203; SetPlayerSkin(playerid, 203); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 14) { PlayerInfo[playerid][pTeam] = 15; gTeam[playerid] = 12; ChosenSkin[playerid] = 107; SetPlayerSkin(playerid, 107); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 15) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 17; ChosenSkin[playerid] = 30; SetPlayerSkin(playerid, 30); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 16) { PlayerInfo[playerid][pTeam] = 25; gTeam[playerid] = 2; ChosenSkin[playerid] = 59; SetPlayerSkin(playerid, 59); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 17) { PlayerInfo[playerid][pTeam] = 18; gTeam[playerid] = 12; ChosenSkin[playerid] = 103; SetPlayerSkin(playerid, 103); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 18) { PlayerInfo[playerid][pTeam] = 19; gTeam[playerid] = 12; ChosenSkin[playerid] = 109; SetPlayerSkin(playerid, 109); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 19) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 40; SetPlayerSkin(playerid, 40); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 20) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 47; SetPlayerSkin(playerid, 47); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 21) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 247; SetPlayerSkin(playerid, 247); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 22) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 181; SetPlayerSkin(playerid, 181); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 23) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ChosenSkin[playerid] = 101; SetPlayerSkin(playerid, 101); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 24) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 25) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 29; SetPlayerSkin(playerid, 29); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 26) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 230; SetPlayerSkin(playerid, 230); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 27) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 28) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 29; SetPlayerSkin(playerid, 29); }
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 29) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 230; SetPlayerSkin(playerid, 230); }
}