problemas adjuntando remolques (traductor ****** '-')
#1

Tengo este cуdigo y quiero conectar el remolque al otro ... alguien me puede ayudar? lo siento mi espaсol ... (Ver la imagen de entender cuбl estб sucediendo)
Code:
CMD:train(playerid,params[])
{
    new Float:vX, Float:vY, Float:vZ;
    GetPlayerPos(playerid, vX, vY, vZ);
    new veh = CreateVehicle(515, vX, vY, vZ, 0, 0, 1, -1), trail = CreateVehicle(591, vX, vY, vZ, 0, 0, 1, -1);
    PutPlayerInVehicle(playerid, veh, 0);
    AttachTrailerToVehicle(trail, veh);
    AttachTrailerToVehicle(CreateVehicle(435, vX, vY, vZ, 0, 0, 1, -1), trail);
    return 1;
}
Reply
#2

debes usar AttachTrailerToVehicle.

el primer remolque se lo colocas al vehнculo, el segundo remolque se lo colocas al remolque que le colocaste al vehнculo.

saludos.


[ame]www.youtube.com/watch?v=63Mvom4VnFs[/ame]

pawn Code:
#include <a_samp>
#include <zcmd> //https://sampforum.blast.hk/showthread.php?tid=91354

#define MAX_REMOLQUES (6)
new VehiculoRemolque,
RemolquesMultiples[MAX_REMOLQUES];

public OnFilterScriptInit(){
    AddPlayerClass(25, 311.5762, 1863.4197+10, 19.0723, 0.0000, 0, 0, 0, 0, 0, 0);
    VehiculoRemolque = AddStaticVehicleEx(515, 311.7824, 1880.7462, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[0] = AddStaticVehicleEx(591, 300.6827, 1894.0166, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[1] = AddStaticVehicleEx(591, 346.0360, 1864.5160, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[2] = AddStaticVehicleEx(591, 293.1635, 1852.6409, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[3] = AddStaticVehicleEx(591, 335.2423, 1812.6162, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[4] = AddStaticVehicleEx(591, 317.3186, 1794.4055, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[5] = AddStaticVehicleEx(591, 301.2630, 1804.5734, 19.0723, 0.0000, random(200),random(200),30*60000);
    return true;
}

COMMAND:remolques(playerid, params[]){
    //atando remolques
    AttachTrailerToVehicle(RemolquesMultiples[0], VehiculoRemolque); //remolque 1
    AttachTrailerToVehicle(RemolquesMultiples[1], RemolquesMultiples[0]); //remolque 2
    AttachTrailerToVehicle(RemolquesMultiples[2], RemolquesMultiples[1]); //remolque 3
    AttachTrailerToVehicle(RemolquesMultiples[3], RemolquesMultiples[2]); //remolque 4
    AttachTrailerToVehicle(RemolquesMultiples[4], RemolquesMultiples[3]); //remolque 5
    AttachTrailerToVehicle(RemolquesMultiples[5], RemolquesMultiples[4]); //remolque 6
    return true;
}
Reply
#3

Quote:
Originally Posted by OTACON
View Post
debes usar AttachTrailerToVehicle.

el primer remolque se lo colocas al vehнculo, el segundo remolque se lo colocas al remolque que le colocaste al vehнculo.

saludos.


www.youtube.com/watch?v=63Mvom4VnFs

pawn Code:
#include <a_samp>
#include <zcmd> //https://sampforum.blast.hk/showthread.php?tid=91354

#define MAX_REMOLQUES (6)
new VehiculoRemolque,
RemolquesMultiples[MAX_REMOLQUES];

public OnFilterScriptInit(){
    AddPlayerClass(25, 311.5762, 1863.4197+10, 19.0723, 0.0000, 0, 0, 0, 0, 0, 0);
    VehiculoRemolque = AddStaticVehicleEx(515, 311.7824, 1880.7462, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[0] = AddStaticVehicleEx(591, 300.6827, 1894.0166, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[1] = AddStaticVehicleEx(591, 346.0360, 1864.5160, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[2] = AddStaticVehicleEx(591, 293.1635, 1852.6409, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[3] = AddStaticVehicleEx(591, 335.2423, 1812.6162, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[4] = AddStaticVehicleEx(591, 317.3186, 1794.4055, 19.0723, 0.0000, random(200),random(200),30*60000);
    RemolquesMultiples[5] = AddStaticVehicleEx(591, 301.2630, 1804.5734, 19.0723, 0.0000, random(200),random(200),30*60000);
    return true;
}

COMMAND:remolques(playerid, params[]){
    //atando remolques
    AttachTrailerToVehicle(RemolquesMultiples[0], VehiculoRemolque); //remolque 1
    AttachTrailerToVehicle(RemolquesMultiples[1], RemolquesMultiples[0]); //remolque 2
    AttachTrailerToVehicle(RemolquesMultiples[2], RemolquesMultiples[1]); //remolque 3
    AttachTrailerToVehicle(RemolquesMultiples[3], RemolquesMultiples[2]); //remolque 4
    AttachTrailerToVehicle(RemolquesMultiples[4], RemolquesMultiples[3]); //remolque 5
    AttachTrailerToVehicle(RemolquesMultiples[5], RemolquesMultiples[4]); //remolque 6
    return true;
}
Hm ... interesante. Voy a probar maсana y voy a decirte algo
Reply
#4

It worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)