[Ajuda] Veiculo /vip
#1

Quando eu compro um veiculo vip no Gm Brasil Vida Online ele compra normal o carro mais quando vou /veiculo estacionar aparece que "este nгo й seu carro vip" Alguem pod me ajudar a arrumar esse problema ?
Reply
#2

Posta o cуdigo do '/veiculo estacionar'...
Reply
#3

pawn Код:
if(strcmp(tmp, "estacionar", true) == 0)
        {
            if(PlayerInfo[playerid][pCarKey] == 1 && PlayerInfo[playerid][pCarKey2] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
                return 1;
            }
            if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
            {
                SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
                return 1;
            }
            new Float:x,Float:y,Float:z;
            new Float:a;
            new carid;
            new getcarid;
            new Veiculo;
            if(vehid == PlayerInfo[playerid][pCarKey]) { carid = PlayerInfo[playerid][pCarKey]; Veiculo = PlayerInfo[playerid][pVeiculo]; }
            else if(vehid == PlayerInfo[playerid][pCarKey2]) { carid = PlayerInfo[playerid][pCarKey2]; Veiculo = PlayerInfo[playerid][pVeiculo2]; }
            if(IsPlayerInVehicle(playerid,carid) && CarInfo[Veiculo][cOwned] == 1)
            {
                getcarid = GetPlayerVehicleID(playerid);
                GetPlayerName(playerid, playername, sizeof(playername));
                GetVehiclePos(carid, x, y, z);
                GetVehicleZAngle(carid, a);
                if(getcarid == carid)
                {
                    CarInfo[Veiculo][cLocationx] = x;
                    CarInfo[Veiculo][cLocationy] = y;
                    CarInfo[Veiculo][cLocationz] = z;
                    CarInfo[Veiculo][cAngle] = a;
                    format(string, sizeof(string), "~n~ Veiculo Estacionado Aqui! ~n~");
                    GameTextForPlayer(playerid, "Veiculo Estacionado!~n~Ele vai nascer aqui!.", 10000, 3);
                    DestroyVehicle(carid);
                    new carid2 = CreateVehicle(CarInfo[Veiculo][cModel],CarInfo[Veiculo][cLocationx],CarInfo[Veiculo][cLocationy],CarInfo[Veiculo][cLocationz]+1.0,CarInfo[Veiculo][cAngle],CarInfo[Veiculo][cColorOne],CarInfo[Veiculo][cColorTwo],60000);
                    TogglePlayerControllable(playerid, 1);
                    SaveCars();
                    SetVehicleToRespawn(carid2);
                    return 1;
                }
                return 1;
            }
            return 1;
        }
Reply
#4

Код:
		if(strcmp(tmp, "estacionar", true) == 0)
		{
		    if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0 && PlayerInfo[playerid][pCarKey3] == 0)
			{
				SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
				return 1;
			}
			if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid && PlayerInfo[playerid][pCarKey3] != vehid)
			{
				SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
				return 1;
			}
	    	new Float:x,Float:y,Float:z;
			new Float:a;
			new carid;
			new getcarid;
			new Veiculo;
   			if(vehid == PlayerInfo[playerid][pCarKey]) { carid = PlayerInfo[playerid][pCarKey]; Veiculo = PlayerInfo[playerid][pVeiculo]; }
			else if(vehid == PlayerInfo[playerid][pCarKey2]) { carid = PlayerInfo[playerid][pCarKey2]; Veiculo = PlayerInfo[playerid][pVeiculo2]; }
			else if(vehid == PlayerInfo[playerid][pCarKey3]) { carid = PlayerInfo[playerid][pCarKey3]; Veiculo = PlayerInfo[playerid][pVeiculo3]; }
			if(IsPlayerInVehicle(playerid,carid) && CarInfo[Veiculo][cOwned] == 1)
			{
			    getcarid = GetPlayerVehicleID(playerid);
				GetPlayerName(playerid, playername, sizeof(playername));
				GetVehiclePos(carid, x, y, z);
				GetVehicleZAngle(carid, a);
               	if(getcarid == carid)
				{
					CarInfo[Veiculo][cLocationx] = x;
					CarInfo[Veiculo][cLocationy] = y;
					CarInfo[Veiculo][cLocationz] = z;
					CarInfo[Veiculo][cAngle] = a;
					format(string, sizeof(string), "~n~ Veiculo Estacionado Aqui! ~n~");
					GameTextForPlayer(playerid, "Veiculo Estacionado!~n~Ele vai nascer aqui!.", 10000, 3);
					DestroyVehicle(carid);
					new carid2 = CreateVehicle(CarInfo[Veiculo][cModel],CarInfo[Veiculo][cLocationx],CarInfo[Veiculo][cLocationy],CarInfo[Veiculo][cLocationz]+1.0,CarInfo[Veiculo][cAngle],CarInfo[Veiculo][cColorOne],CarInfo[Veiculo][cColorTwo],60000);
					TogglePlayerControllable(playerid, 1);
					SaveCars();
					SetVehicleToRespawn(carid2);
					return 1;
  				}
				return 1;
			}
			return 1;
		}
Reply
#5

Meu deus, eu tenho um sistema semelhante que estaciona o seu prуprio carro e nгo gastei se quer 10 linhas no comando.
Reply
#6

Quote:
Originally Posted by WeenSoares_
Посмотреть сообщение
Meu deus, eu tenho um sistema semelhante que estaciona o seu prуprio carro e nгo gastei se quer 10 linhas no comando.
1Є- O GM Dele e Base BMG

2Є- Postou sу para ganhar post?

3Є- Nгo entendi muito bem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)