11.06.2012, 19:15
Meu GM tem 22 orgs, toda veiz que eu convido alguem pra uma org que eu sou lider quando ele aceita nгo acontece nada.
Vou postar as linhas.
Se alguem puder me ajudar agradeзo.
Vou postar as linhas.
Код:
//new para1; if(strcmp(x_Emprego,"convite",true) == 0) { if(InviteOffer[playerid] < 999) { if(IsPlayerConnected(InviteOffer[playerid])) { 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] = 274; SetPlayerSkin(playerid, 274); } 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] = 186; SetPlayerSkin(playerid, 186); } 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] = 247; SetPlayerSkin(playerid, 247); } else if(PlayerInfo[InviteOffer[playerid]][pLider] == 21) { PlayerInfo[playerid][pTeam] = 20; gTeam[playerid] = 12; ChosenSkin[playerid] = 292; SetPlayerSkin(playerid, 292); } else if(PlayerInfo[InviteOffer[playerid]][pLider] == 22) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ChosenSkin[playerid] = 118; SetPlayerSkin(playerid, 118); } else if(PlayerInfo[InviteOffer[playerid]][pLider] == 23) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ChosenSkin[playerid] = 112; SetPlayerSkin(playerid, 112); } PlayerInfo[playerid][pMembro] = InviteJob[playerid]; PlayerInfo[playerid][pCargo] = 1; SelectCharID[playerid] = PlayerInfo[playerid][pMembro]; format(gstring, 128, "* %s aceitou seu convite para entrar na sua organizaзгo.", PlayerName(playerid)); SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, gstring); new rand = random(sizeof(gInviteSpawns)); SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]); SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]); SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); Controle(playerid, 0); SelectChar[playerid] = 255; SelectCharID[playerid] = PlayerInfo[playerid][pMembro]; SelectCharPlace[playerid] = 1; PlayerInfo[playerid][pSkin] = ChosenSkin[playerid]; SetPlayerSkin(playerid, ChosenSkin[playerid]); //SendClientMessage(playerid, COLOR_LIGHTRED, "* Use 'Proximo' para trocar a skin."); //SendClientMessage(playerid, COLOR_LIGHTRED, "* Quandod Vocк achar a Skin preferida, Digite 'Confirma'."); //ShowPlayerDialog(para1, 643, DIALOG_STYLE_MSGBOX, "Escolha Sua Skin", "Proximo: Para trocar sua skin.\nConfirmar: Para confirmar sua skin.", "Confirmar", "Prуximo"); format(gstring, sizeof(gstring), "* Vocк aceitou o convite de %s para entrar para a org: %s, parabйns.", PlayerName(InviteOffer[playerid]), NomeORG(InviteOffer[playerid])); SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring); ConviteInfoOrg(PlayerName(playerid), InviteJob[playerid], 1); } else { SendClientMessage(playerid, COLOR_GREY, " O jogador que lhe convidou nгo estб conectado."); return true; } } else { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo foi convidado para nenhuma organizaзгo."); return true; } }
Код:
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 true; } 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 true; } 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 true; } if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); /*ShowPlayerDialog(para1, 642, DIALOG_STYLE_MSGBOX, "Convite", "{E679F2}Vocк foi convidado para uma organizaзгo: %s \n{63ACFF}Deseja entrar para a organizaзгo ?", "Sim", "Nao", NomeORG(playerid)); format(string, sizeof(string), "* {F2D61F}%s {E3E3E3}te convidou para entrar para: {F2D61F}%s. Sim {E3E3E3}- {3EF02E}Aceita {E3E3E3}| {FF4053}Nгo {E3E3E3}- Recusa.", 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); new convitestring[256]; format(convitestring,sizeof(convitestring), "{E679F2}Vocк foi convidado para uma organizaзгo: %s \n{63ACFF}Deseja entrar para a organizaзгo ?",NomeORG(playerid)); ShowPlayerDialog(para1,642,DIALOG_STYLE_MSGBOX,"Convite",convitestring,"Sim","Nao"); InviteOffer[para1] = playerid; InviteJob[para1] = lolz; } }//not connected } else { SendClientMessage(playerid, COLOR_GREY, " Somente lнderes podem usar este comando !"); } } return true; }