[AJUDA] O comando /convidar faz o server cair
#1

ola, estou encontrando um problema em meu GM :

SITUAЗГO:

Sou lider de uma organiзгo , ai vou convidar alguem para fazer parte dela = ate OK
quando dou /convidar e o player da o comando /aceitar convite, o servidor dentro de uns 20 segundo cai O.o
todas as coisas do meu GM eu programei menos o registro e o bendito convidar... registro fuincia normalmente atualmente apromorei ele mas quando a pessoa aceita o convite o server vai pro barro e shutdown.

Alguem pode me dar uma luz do q pode esta contecendo ?

o comando segue abaixo



Код:
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 ftext[20];
			para1 = ReturnUser(tmp);
			if (PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[para1][pMember] == 0)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
					    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] >= 0)
					    {
					        if(PlayerInfo[playerid][pLeader] == 0) {  ftext = "Civil"; }
					        else if(PlayerInfo[playerid][pLeader] == 1) { ftext = "Polнcia Militar"; }
					        else if(PlayerInfo[playerid][pLeader] == 2) {  ftext = "Polнcia Federal"; }
					        else if(PlayerInfo[playerid][pLeader] == 3) {  ftext = "Forзas Armadas"; }
					        else if(PlayerInfo[playerid][pLeader] == 4) {  ftext = "Emergкncias.";  }
					        else if(PlayerInfo[playerid][pLeader] == 5) {  ftext = "Ballas Gang";  }
					        else if(PlayerInfo[playerid][pLeader] == 6) {  ftext = "Grove Street";  }
					        else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "Polнtico"; }
					        else if(PlayerInfo[playerid][pLeader] == 8) {  ftext = "Assassino";  }
					        else if(PlayerInfo[playerid][pLeader] == 9) {  ftext = "Repуrter";  }
					        else if(PlayerInfo[playerid][pLeader] == 11) {  ftext = "Instrutor";  }
					        else if(PlayerInfo[playerid][pLeader] == 12) { ftext = "Los Vagos";  }
					        else if(PlayerInfo[playerid][pLeader] == 13) { ftext = "Motoqueiros";  }
					        else if(PlayerInfo[playerid][pLeader] == 14) {  ftext = "Policia Rodoviбria"; }
					        else if(PlayerInfo[playerid][pLeader] == 15) {  ftext = "Los Aztecas"; }
			                else if(PlayerInfo[playerid][pLeader] == 16) {  ftext = "Triads"; }
			                else if(PlayerInfo[playerid][pLeader] == 17) {  ftext = "Yakuza"; }
			                else if(PlayerInfo[playerid][pLeader] == 18) {  ftext = "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, ftext);
							format(string, sizeof(string), "* Vocк recebeu um convite para entrar na profissгo '%s' (digite /aceitar convite) para aceitar.", ftext, sendername);
							SendClientMessage(para1, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "* Vocк convidou %s para sua profissгo '%s'.", giveplayer,ftext);
							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;
	}
*** onde o player aceita ***

Код:
if(strcmp(x_job,"convite",true) == 0)
			{
				if(Invite[playerid] == 1)
			    {
					if(IsPlayerConnected(InviteOffer[playerid]))
					{
						new str[256];
						new ftext[20];
						GetPlayerName(InviteOffer[playerid], giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(PlayerInfo[InviteOffer[playerid]][pLeader] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PM"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PF"; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "Forзas Armadas"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
						else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "Emergкncias."; ChosenSkin[playerid] = 71; SetPlayerSkin(playerid, 71); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 5) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Ballas Gang"; ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 6) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Grove Street"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 7) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ftext = "Polнtico"; ChosenSkin[playerid] = 295; SetPlayerSkin(playerid, 295); }
                            {
							format(str, 256, "* %s aceitou seu convite proposto a organizaзг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);
					   		SelectCharID[playerid] = PlayerInfo[playerid][pMember];
					   		SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]);
					   		PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader];
						    PlayerInfo[playerid][pRank] = 1;
							return 1;
						}
	                    if(PlayerInfo[InviteOffer[playerid]][pLeader] == 8) { PlayerInfo[playerid][pTeam] = 8; gTeam[playerid] = 8; ftext = "Assassino"; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 9) { PlayerInfo[playerid][pTeam] = 9; gTeam[playerid] = 9; ftext = "Repуrter"; ChosenSkin[playerid] = 227; SetPlayerSkin(playerid, 227); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 11) { PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; ftext = "Instrutor"; ChosenSkin[playerid] = 59; SetPlayerSkin(playerid, 59); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 12) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Vagos"; ChosenSkin[playerid] = 109; SetPlayerSkin(playerid, 109); }
					    else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 13) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Motoqueiros"; ChosenSkin[playerid] = 254; SetPlayerSkin(playerid, 254); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 14) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 5; ftext = "Policia Rodoviбria"; ChosenSkin[playerid] = 288; SetPlayerSkin(playerid, 288); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 15) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Aztecas"; ChosenSkin[playerid] = 116; SetPlayerSkin(playerid, 116); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 16) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "Triads"; ChosenSkin[playerid] = 111; SetPlayerSkin(playerid, 111); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 17) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "yakuza"; ChosenSkin[playerid] = 123; SetPlayerSkin(playerid, 123); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 18) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "terroristas"; ChosenSkin[playerid] = 291; SetPlayerSkin(playerid, 291); }
						else { return 1; }
						PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader];
						PlayerInfo[playerid][pRank] = 1;
					    SelectCharID[playerid] = PlayerInfo[playerid][pMember];
					   	format(str, 256, "* %s aceitou seu convite proposto a organizaзгo '%s'.", sendername, ftext);
					   	SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, str);
					   	SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]);
					   	format(str, 256, "* Vocк aceitou o convite de emprego '%s' proposto por %s, parabйns.", ftext, giveplayer);
					   	SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "    O jogador que lhe convidou nгo estб conectado.");
						return 1;
					}
				} else {
					SendClientMessage(playerid, COLOR_GREY, "    Vocк nгo foi convidado de absolutamente nada.");
					return 1;
				}
			}

desde ja Obrigado
Reply
#2

Manow eu tinha esse problema quando o contrato era cumprido, o servidor caia, nao me recordo quem agora .. arrumou pra mim .. mais pelo que lembro era alguma coisa no final, no return ou nas chaves, testa mexer nelas, nao sei

eu sу passei o cmd, e o cara arrumou pra mim, realmente nao lembro ;//
Reply
#3

Tendeu, mas vc n tem esse comando em algum Gm para poder me ajudar ??
Reply
#4

Se nгo fosse thug eu ajudava.
Reply
#5

Higor, qual o grande problema q vc tem com Thug?
Reply
#6

Mass meu GM nao e Thug, й autoria propria, so o /convidar q esta copiado
Reply
#7

Vou deixar minha resposta:

Se isso estб copiado(o que estб) tente pegar outro FS/Code de um outro GM...
Reply
#8

Eu sei pegar o comando de outro Gm e facil, so que gostaria de achar o problema desse comando, pq n gosto de trabalhar com CTRL+C CTRL+V, por isso q programei meu GM do 0.
Reply
#9

Procure deixar sempre os else embaixo dos seus correspondentes if


Isto deve resolver o seu problema:


pawn Код:
if(strcmp(x_job,"convite",true) == 0)
            {
                if(Invite[playerid] == 1)
                {
                    if(IsPlayerConnected(InviteOffer[playerid]))
                    {
                        new str[256];
                        new ftext[20];
                        GetPlayerName(InviteOffer[playerid], giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(PlayerInfo[InviteOffer[playerid]][pLeader] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PM"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PF"; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "Forзas Armadas"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "Emergкncias."; ChosenSkin[playerid] = 71; SetPlayerSkin(playerid, 71); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 5) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Ballas Gang"; ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 6) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Grove Street"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 7) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ftext = "Polнtico"; ChosenSkin[playerid] = 295; SetPlayerSkin(playerid, 295); }
                            {
                            format(str, 256, "* %s aceitou seu convite proposto a organizaзг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);
                            SelectCharID[playerid] = PlayerInfo[playerid][pMember];
                            SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]);
                            PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader];
                            PlayerInfo[playerid][pRank] = 1;
                            return 1;
                        }
                        if(PlayerInfo[InviteOffer[playerid]][pLeader] == 8) { PlayerInfo[playerid][pTeam] = 8; gTeam[playerid] = 8; ftext = "Assassino"; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 9) { PlayerInfo[playerid][pTeam] = 9; gTeam[playerid] = 9; ftext = "Repуrter"; ChosenSkin[playerid] = 227; SetPlayerSkin(playerid, 227); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 11) { PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; ftext = "Instrutor"; ChosenSkin[playerid] = 59; SetPlayerSkin(playerid, 59); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 12) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Vagos"; ChosenSkin[playerid] = 109; SetPlayerSkin(playerid, 109); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 13) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Motoqueiros"; ChosenSkin[playerid] = 254; SetPlayerSkin(playerid, 254); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 14) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 5; ftext = "Policia Rodoviбria"; ChosenSkin[playerid] = 288; SetPlayerSkin(playerid, 288); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 15) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Aztecas"; ChosenSkin[playerid] = 116; SetPlayerSkin(playerid, 116); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 16) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "Triads"; ChosenSkin[playerid] = 111; SetPlayerSkin(playerid, 111); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 17) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "yakuza"; ChosenSkin[playerid] = 123; SetPlayerSkin(playerid, 123); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 18) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "terroristas"; ChosenSkin[playerid] = 291; SetPlayerSkin(playerid, 291); }
                        else { return 1; }
                        PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader];
                        PlayerInfo[playerid][pRank] = 1;
                        SelectCharID[playerid] = PlayerInfo[playerid][pMember];
                        format(str, 256, "* %s aceitou seu convite proposto a organizaзгo '%s'.", sendername, ftext);
                        SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, str);
                        SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]);
                        format(str, 256, "* Vocк aceitou o convite de emprego '%s' proposto por %s, parabйns.", ftext, giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "    O jogador que lhe convidou nгo estб conectado.");
                        return 1;
                    }
                }
                else
                }
                    SendClientMessage(playerid, COLOR_GREY, "    Vocк nгo foi convidado de absolutamente nada.");
                    return 1;
                }
            }

Espero ter ajudado
Reply
#10

Код:
	if(strcmp(cmd, "/convidar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [ id ]");
				return 1;
			}
			new para1;
			new ftext[20];
			para1 = ReturnUser(tmp);
			if(PlayerInfo[para1][pMembro] != 0 || PlayerInfo[para1][pLider] != 0)
			{
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "Desculpe-me mais estes players jб participam de Org/Gang.");
				return 1;
			}
			if (PlayerInfo[playerid][pCargo] > 5 || PlayerInfo[playerid][pMembro] == 6)
			{
			    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][pFMember] == 255)
			    			{
     						if(PlayerInfo[playerid][pLider] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 282; SetPlayerSkin(para1, 282); }
		        			else if(PlayerInfo[playerid][pLider] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTAM"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
				        	else if(PlayerInfo[playerid][pLider] == 3) { PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exйrcito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
				        	else if(PlayerInfo[playerid][pLider] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Mйdicos"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
				        	else if(PlayerInfo[playerid][pLider] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Varrios Los Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115); }
		       				else if(PlayerInfo[playerid][pLider] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Hamas"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
				        	else if(PlayerInfo[playerid][pLider] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 147; SetPlayerSkin(para1, 147); }
				        	else if(PlayerInfo[playerid][pLider] == 8) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127); }
				        	else if(PlayerInfo[playerid][pLider] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
				        	else if(PlayerInfo[playerid][pLider] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
				        	else if(PlayerInfo[playerid][pLider] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Instrutores"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
		       				else if(PlayerInfo[playerid][pLider] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 12; ftext = "Groove Street"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
				        	else if(PlayerInfo[playerid][pLider] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 12; ftext = "Al'Qaeda"; ChosenSkin[para1] = 30; SetPlayerSkin(para1, 30); }
				        	else if(PlayerInfo[playerid][pLider] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 2; ftext = "Policia Civil"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163); }
				        	else if(PlayerInfo[playerid][pLider] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 12; ftext = "Ballas"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104); }
				        	else if(PlayerInfo[playerid][pLider] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 12; ftext = "Los Santos Vagos"; ChosenSkin[para1] = 167; SetPlayerSkin(para1, 167); }
				        	else if(PlayerInfo[playerid][pLider] == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Los Diablos"; ChosenSkin[para1] = 21; SetPlayerSkin(para1, 21); }
				        	else if(PlayerInfo[playerid][pLider] == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 21; ftext = "Cobras"; ChosenSkin[para1] = 21; SetPlayerSkin(para1, 21); }
				        	else if(PlayerInfo[playerid][pLider] == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 22; ftext = "Terceiro Comando"; ChosenSkin[para1] = 117; SetPlayerSkin(para1, 117); }
				        	else if(PlayerInfo[playerid][pLider] == 23) { PlayerInfo[para1][pTeam] = 23; gTeam[para1] = 23; ftext = "Comando Vermelho"; ChosenSkin[para1] = 24; SetPlayerSkin(para1, 24); }
				        	else if(PlayerInfo[playerid][pLider] == 24) { PlayerInfo[para1][pTeam] = 24; gTeam[para1] = 24; ftext = "Drifter"; ChosenSkin[para1] = 28; SetPlayerSkin(para1, 28); }
		       				else if(PlayerInfo[playerid][pLider] == 25) { PlayerInfo[para1][pTeam] = 25; gTeam[para1] = 25; ftext = "Policia Rodoviaria"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
				        	else if(PlayerInfo[playerid][pLider] == 26) { PlayerInfo[para1][pTeam] = 26; gTeam[para1] = 26; ftext = "PCC"; ChosenSkin[para1] = 167; SetPlayerSkin(para1, 167); }
        					else if(PlayerInfo[playerid][pLider] == 27) { PlayerInfo[para1][pTeam] = 27; gTeam[para1] = 27; ftext = "Guerrilheiros"; ChosenSkin[para1] = 34; SetPlayerSkin(para1, 34); }
				        	else { return 1; }
							GetPlayerName(para1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							PlayerInfo[para1][pMembro] = PlayerInfo[playerid][pLider];
							PlayerInfo[para1][pCargo] = 1;
							printf("AdmCmd: %s tem convidado o %s para entrar na(o) %s.", sendername, giveplayer, ftext);
							format(string, sizeof(string), "   Vocк entrou para %s, vocк foi convidado pelo lider %s", ftext, sendername);
							SendClientMessage(para1, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "   Vocк convidou %s para entrar para %s.", giveplayer,ftext);
							SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
							SetPlayerInterior(para1,0);
							PlayerInfo[playerid][pCarLic] = 0;
							PlayerInfo[playerid][pFlyLic] = 0;
							PlayerInfo[playerid][pBoatLic] = 0;
							PlayerInfo[playerid][pFishLic] = 0;
							PlayerInfo[playerid][pGunLic] = 0;
							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];
					    	SendClientMessage(para1, COLOR_LIGHTRED, "* Use 'Proximo' Para selecionar o Skin desejado.");
					    	SendClientMessage(para1, COLOR_LIGHTRED, "* Quando encontrar o skin desejado USE 'Pronto'.");
						}
						else
						{
	    					SendClientMessage(playerid, COLOR_GREY, "  Esse jogador й procurado/ Й de uma organizaзгo diferente/ ou membro de uma familia");
					    	return 1;
						}
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб autorizado para usar este comando( Somente Lideres )!");
			}
   		}
		return 1;
	}
pega o meu ae tbm, testa ai, se nao der ;x

ta meio desorganizado de preguiзa, ai tu ajeita ai
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)