[Ajuda] Objetos no carro
#1

Galera to tentando grudar objetos em uns carros ai, mais nгo ta dando certo vejam :

Ta assim na OnGameModeInit :
pawn Код:
public OnGameModeInit()
{

    DPBullet[0] = AddStaticVehicle(541,2281.9734,2477.2083,10.4452,179.5741,0,1);
    DPBullet[1] = AddStaticVehicle(541,2277.9106,2477.4766,10.4451,178.1505,0,1);
    DPBullet[2] = AddStaticVehicle(541,2273.5063,2478.0779,10.4452,180.9013,0,1);

    DPInfernus[0] = AddStaticVehicle(411,2282.5854,2442.7466,10.5474,0.9889,0,1);
    DPInfernus[1] = AddStaticVehicle(411,2278.1311,2443.5552,10.5474,0.6301,0,1);
    DPInfernus[2] = AddStaticVehicle(411,2273.5374,2444.0151,10.5474,359.5745,0,1);

    DPTurismo[0] = AddStaticVehicle(451,2251.7000,2477.2251,10.5280,180.0437,0,1);
    DPTurismo[1] = AddStaticVehicle(451,2256.3296,2476.9458,10.5269,178.7289,0,1);
   
    new COPOBJ = CreateObject(18646, 0,0, -1000,0,0,0,100);
   
    AttachObjectToVehicle(COPOBJ, DPBullet[0]  , -0.375000,0.075000,0.675000,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(COPOBJ, DPBullet[1]  , -0.375000,0.075000,0.675000,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(COPOBJ, DPBullet[2]  , -0.375000,0.075000,0.675000,0.000000,0.000000,0.000000);

    AttachObjectToVehicle(COPOBJ, DPInfernus[0], -0.449999,0.150000,0.750000,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(COPOBJ, DPInfernus[1], -0.449999,0.150000,0.750000,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(COPOBJ, DPInfernus[2], -0.449999,0.150000,0.750000,0.000000,0.000000,0.000000);

    AttachObjectToVehicle(COPOBJ, DPTurismo[0], -0.449999,-0.300000,0.599999,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(COPOBJ, DPTurismo[1], -0.449999,-0.300000,0.599999,0.000000,0.000000,0.000000);
    return 1;
}
Era pra attachar o objeto em todos esses carros ai /\
mais quando eu entro, sу tem um carro com o objeto.
Pq ?
Reply
#2

Alguйm me ajuda ?
Reply
#3

Pq o objeto tambem й so um, tem de criar 1 objecto para cada carro.
Reply
#4

Quote:
Originally Posted by PT
Посмотреть сообщение
Pq o objeto tambem й so um, tem de criar 1 objecto para cada carro.
Exatamente, й necessбrio um objeto para cada veнculo, vocк estб usando o mesmo attachment em todos os carros, desta forma o objeto fica sу no ъltimo veнculo em que foi setado o attachment.
Reply
#5

Caramba entгo eu tenho que criar vбrios objetos ? Tipo :

new obj1
new obj2
new obj3

tem alguma forma mais otimizada de fazer isso ??
Reply
#6

Quote:
Originally Posted by Duun
Посмотреть сообщение
Caramba entгo eu tenho que criar vбrios objetos ? Tipo :

new obj1
new obj2
new obj3

tem alguma forma mais otimizada de fazer isso ??
Eu acho que da pra rodar um loop definindo o maximo de attachments .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)