[AJUDA]Org nгo estб convidando
#1

Minha org sons of anarchy nгo esґta convidando.. depois que tentei arrumar :/ antes convidava o serve caнa.

PHP код:
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd"/convidar"true) == 0)
{
if(
IsPlayerConnected(playerid))
{
tmp strtok(cmdtextidx);
if(!
strlen(tmp))
{
SendClientMessage(playeridCOLOR_GRAD2"Uso correto: /convidar [ id ].");
return 
1;
}
new 
para1;
new 
ftext[150];
para1 ReturnUser(tmp);
tmp strtok(cmdtextidx);
if (
PlayerInfo[playerid][pLider] >= || PlayerInfo[playerid][pMembro] >= && PlayerInfo[playerid][pCargo] == 444 || PlayerInfo[playerid][pMembro] >= && PlayerInfo[playerid][pCargo] == 555)
{
if(
IsPlayerConnected(para1))
{
if(
PlayerInfo[para1][pLevel] < 2) { SendClientMessage(playeridCOLOR_GREY"So pode convidar quem й nivel 2 ou acima de 2!!!"); return 1;
}
if(
para1 != INVALID_PLAYER_ID)
{
if (
PlayerInfo[para1][pMembro] == && PlayerInfo[para1][pLider] == 0)
{
new 
orgl;
if(
PlayerInfo[playerid][pMembro] >= 1)
{
orgl PlayerInfo[playerid][pMembro];
}
if(
PlayerInfo[playerid][pLider] >= 1)
{
orgl PlayerInfo[playerid][pLider];
}
if(
InfoorgGeral(para1orgl)) { } else { SendClientMessage(playerid,azulagua,"A org estб cheia libere uma vaga (/limparVaga)."); return 1;}
if(
orgl == 1) { PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2ftext "Policia Militar"ChosenSkin[para1] = 192;}
else if(
orgl == 2) {PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2ftext "ROTA"ChosenSkin[para1] = 172SetPlayerSkin(para1172);}
else if(
orgl == 3) {PlayerInfo[para1][pTeam] = 3gTeam[para1] = 3ftext "Exйrcito"ChosenSkin[para1] = 191SetPlayerSkin(para1191);}
else if(
orgl == 4) { PlayerInfo[para1][pTeam] = 1gTeam[para1] = 1ftext "Mйdicos"ChosenSkin[para1] = 274SetPlayerSkin(para1274);}
else if(
orgl == 5) { PlayerInfo[para1][pTeam] = 5gTeam[para1] = 5ftext "Varrios Los Aztecas"ChosenSkin[para1] = 115SetPlayerSkin(para1115);}
else if(
orgl == 6) { PlayerInfo[para1][pTeam] = 5gTeam[para1] = 5ftext "FARC"ChosenSkin[para1] = 222SetPlayerSkin(para1222);}
else if(
orgl == 7) { PlayerInfo[para1][pTeam] = 7gTeam[para1] = 7ftext "Prefeitura"ChosenSkin[para1] = 163SetPlayerSkin(para1163);}
else if(
orgl == 8) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Nos Hitmans"ChosenSkin[para1] = 261SetPlayerSkin(para1261); }
else if(
orgl == 9) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Reporteres"ChosenSkin[para1] = 227SetPlayerSkin(para1227);}
else if(
orgl == 10) {PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Taxistas"ChosenSkin[para1] = 255SetPlayerSkin(para1255);}
else if(
orgl == 11) {PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Detran"ChosenSkin[para1] = 59SetPlayerSkin(para159);}
else if(
orgl == 15) {PlayerInfo[para1][pTeam] = 15gTeam[para1] = 12ftext "Groove Street"ChosenSkin[para1] = 105SetPlayerSkin(para1105);}
else if(
orgl == 16) {PlayerInfo[para1][pTeam] = 16gTeam[para1] = 12ftext "Guerrilheiros Israelitas"ChosenSkin[para1] = 272SetPlayerSkin(para1272); }
else if(
orgl == 17) {PlayerInfo[para1][pTeam] = 17gTeam[para1] = 2ftext "Policia Federal"ChosenSkin[para1] = 285SetPlayerSkin(para1285);}
else if(
orgl == 18) {PlayerInfo[para1][pTeam] = 18gTeam[para1] = 12ftext "Front Yard Ballas"ChosenSkin[para1] = 103SetPlayerSkin(para1103);}
else if(
orgl == 19) {PlayerInfo[para1][pTeam] = 19gTeam[para1] = 12ftext "Los Santos Vagos"ChosenSkin[para1] = 109SetPlayerSkin(para1109);}
else if(
orgl == 20) { PlayerInfo[para1][pTeam] = 20gTeam[para1] = 20ftext "Mafia Yakuza"ChosenSkin[para1] = 111SetPlayerSkin(para1111);}
else if(
orgl == 20) { PlayerInfo[para1][pTeam] = 21gTeam[para1] = 20ftext "Son of Anarchy"ChosenSkin[para1] = 21SetPlayerSkin(para121);}
else if(
orgl == 22) { PlayerInfo[para1][pTeam] = 22gTeam[para1] = 22ftext "Mбfia Cosa Nostra"ChosenSkin[para1] = 120SetPlayerSkin(para1120);}
else if(
orgl == 23) {PlayerInfo[para1][pTeam] = 23gTeam[para1] = 23ftext "Comando Vermelho"ChosenSkin[para1] = 19SetPlayerSkin(para119);}
else if(
orgl == 24) {PlayerInfo[para1][pTeam] = 24gTeam[para1] = 24ftext "PCC"ChosenSkin[para1] = 28SetPlayerSkin(para1241);}
else if(
orgl == 26){ PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2ftext "CORE"ChosenSkin[para1] = 285;}
else { return 
1; }
SetPlayerToTeamColor(playerid);
GetPlayerName(para1giveplayersizeof(giveplayer));
GetPlayerName(playeridsendernamesizeof(sendername));
PlayerInfo[para1][pMembro] = orgl;
PlayerInfo[para1][pCargo] = 1;
printf("ADMIN CMD: %s convidou %s para entrar %s."sendernamegiveplayerftext);
format(stringsizeof(string), "Voce foi convidado para a %s, pelo Lнder %s."ftextsendername);
SendClientMessage(para1COLOR_LIGHTBLUEstring);
format(stringsizeof(string), "Voce convidou %s para a %s."giveplayer,ftext);
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pFishLic] = 1;
PlayerInfo[playerid][pGunLic] = 1;
new 
rand random(sizeof(gInviteSpawns));
SetPlayerPos(para1gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(para1gInviteSpawns[rand][3]);
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(para10);
SelectChar[para1] = 255;
SelectCharID[para1] = PlayerInfo[para1][pMembro];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
format(string,sizeof(string),"%s para ter mais opзхes de skins clique em prуximo.\nCaso jб tenha escolhido a skin clique em Confirma.",pNome(para1));
ShowPlayerDialog(para1,717,DIALOG_STYLE_MSGBOX,"Selecionando skin para a org que foi convidado.",string,"Proximo","Confirma");
                            }
                                else
                            {
                            
SendClientMessage(playeridCOLOR_GREY"Este jogador jб faz parte de uma organizaзгo.");
                            return 
1;
                        }
                     }
                }
//not connected
             
}
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Voce nao esta autorizado para usar este cmd ( Apenas Lideres )!");
            }
          }
        return 
1;
    } 
Reply
#2

pawn Код:
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Uso correto: /convidar [ id ].");
return 1;
}
new para1;
new ftext[150];
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pMembro] >= 1 && PlayerInfo[playerid][pCargo] == 444 || PlayerInfo[playerid][pMembro] >= 1 && PlayerInfo[playerid][pCargo] == 555)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pLevel] < 2) { SendClientMessage(playerid, COLOR_GREY, "So pode convidar quem й nivel 2 ou acima de 2!!!"); return 1;
}
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMembro] == 0 && PlayerInfo[para1][pLider] == 0)
{
new orgl;
if(PlayerInfo[playerid][pMembro] >= 1)
{
orgl = PlayerInfo[playerid][pMembro];
}
if(PlayerInfo[playerid][pLider] >= 1)
{
orgl = PlayerInfo[playerid][pLider];
}
if(InfoorgGeral(para1, orgl)) { } else { SendClientMessage(playerid,azulagua,"A org estб cheia libere uma vaga (/limparVaga)."); return 1;}
if(orgl == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 192;}
else if(orgl == 2) {PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTA"; ChosenSkin[para1] = 172; SetPlayerSkin(para1, 172);}
else if(orgl == 3) {PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exйrcito"; ChosenSkin[para1] = 191; SetPlayerSkin(para1, 191);}
else if(orgl == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Mйdicos"; ChosenSkin[para1] = 274; SetPlayerSkin(para1, 274);}
else if(orgl == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Varrios Los Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115);}
else if(orgl == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "FARC"; ChosenSkin[para1] = 222; SetPlayerSkin(para1, 222);}
else if(orgl == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163);}
else if(orgl == 8) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Nos Hitmans"; ChosenSkin[para1] = 261; SetPlayerSkin(para1, 261); }
else if(orgl == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 227; SetPlayerSkin(para1, 227);}
else if(orgl == 10) {PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255);}
else if(orgl == 11) {PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Detran"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59);}
else if(orgl == 15) {PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 12; ftext = "Groove Street"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105);}
else if(orgl == 16) {PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 12; ftext = "Guerrilheiros Israelitas"; ChosenSkin[para1] = 272; SetPlayerSkin(para1, 272); }
else if(orgl == 17) {PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 2; ftext = "Policia Federal"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285);}
else if(orgl == 18) {PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 12; ftext = "Front Yard Ballas"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103);}
else if(orgl == 19) {PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 12; ftext = "Los Santos Vagos"; ChosenSkin[para1] = 109; SetPlayerSkin(para1, 109);}
else if(orgl == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Mafia Yakuza"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111);}
else if(orgl == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 20; ftext = "Son of Anarchy"; ChosenSkin[para1] = 21; SetPlayerSkin(para1, 21);}
else if(orgl == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 22; ftext = "Mбfia Cosa Nostra"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 120);}
else if(orgl == 23) {PlayerInfo[para1][pTeam] = 23; gTeam[para1] = 23; ftext = "Comando Vermelho"; ChosenSkin[para1] = 19; SetPlayerSkin(para1, 19);}
else if(orgl == 24) {PlayerInfo[para1][pTeam] = 24; gTeam[para1] = 24; ftext = "PCC"; ChosenSkin[para1] = 28; SetPlayerSkin(para1, 241);}
else if(orgl == 26){ PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "CORE"; ChosenSkin[para1] = 285;}
else { return 1; }
SetPlayerToTeamColor(playerid);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMembro] = orgl;
PlayerInfo[para1][pCargo] = 1;
printf("ADMIN CMD: %s convidou %s para entrar %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "Voce foi convidado para a %s, pelo Lнder %s.", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Voce convidou %s para a %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pFishLic] = 1;
PlayerInfo[playerid][pGunLic] = 1;
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(para1, 0);
SelectChar[para1] = 255;
SelectCharID[para1] = PlayerInfo[para1][pMembro];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
format(string,sizeof(string),"%s para ter mais opзхes de skins clique em prуximo.\nCaso jб tenha escolhido a skin clique em Confirma.",pNome(para1));
ShowPlayerDialog(para1,717,DIALOG_STYLE_MSGBOX,"Selecionando skin para a org que foi convidado.",string,"Proximo","Confirma");
                            }
                                else
                            {
                            SendClientMessage(playerid, COLOR_GREY, "Este jogador jб faz parte de uma organizaзгo.");
                            return 1;
                        }
                     }
                }//not connected
             }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Voce nao esta autorizado para usar este cmd ( Apenas Lideres )!");
            }
          }
        return 1;
    }
Dб Prуxima Nгo da CTRL C + V no de cima kk
Reply
#3

funcionou nгo /\
Reply
#4

Procure por algo como por ex :
pawn Код:
if(strcmp(x_job,"convite",true) == 0)
E crie algo mais ou menos assim ( Mas de acordo com seu GM ) :
pawn Код:
if(PlayerInfo[InviteOffer[playerid]][pLeader] == 30) {
                            PlayerInfo[playerid][pTeam] = 30; gTeam[playerid] = 2; ftext = "Milicia";
                            format(str, 256, "%s aceitou seu convite proposto a organizacгo '%s'.", sendername, ftext);
                            SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, str);
                            format(str, 256, "Vocк aceitou o convite de emprego '%s' proposto por %s, parabйns.", ftext, giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
                            PlayerInfo[playerid][pModel] = 71; SetPlayerSkin(playerid, 71);
                            TogglePlayerControllable(playerid, 1);
                            PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader];
                            PlayerInfo[playerid][pRank] = 1;
                            return 1;
=D
Reply
#5

Nгo consegui e.e
Reply
#6

LOL, tem uns ID tudo repetido ai '-'
Dei uma mudada no comando, tava muito ruim pra visualizaзгo e tals, tб aн:
http://pastebin.com/tdMP51Qh
Caso nгo funcione, verifique os IDs direitinho hein?!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)