SA-MP Forums Archive
problemas adjuntando remolques (traductor ****** '-') - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: problemas adjuntando remolques (traductor ****** '-') (/showthread.php?tid=531664)



problemas adjuntando remolques (traductor ****** '-') - NikiFor - 13.08.2014

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;
}



Respuesta: problemas adjuntando remolques (traductor ****** '-') - OTACON - 13.08.2014

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;
}



Re: Respuesta: problemas adjuntando remolques (traductor ****** '-') - NikiFor - 13.08.2014

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


Re: problemas adjuntando remolques (traductor ****** '-') - NikiFor - 14.08.2014

It worked