AttachObjectToVehicle not working :/
#1

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    new AztecasCarHeatSeeker1,
        AztecasCarHeatSeeker2,
        AztecasCarShield1,
        AztecasCarShield2,
        AztecasCarShield3,
        AztecasCarShield4;
       
    AztecasCarHeatSeeker1=CreateObject(360, 0, 0, 0, 0, 0 ,0, 300.0);
    AztecasCarHeatSeeker2=CreateObject(360, 0, 0, 0, 0, 0, 0, 300.0);
    AztecasCarShield1=CreateObject(18637, 0, 0, 0 ,0 ,0 ,0, 300.0);
    AztecasCarShield2=CreateObject(18637, 0, 0, 0 ,0 ,0 ,0, 300.0);
    AztecasCarShield3=CreateObject(18637, 0, 0, 0 ,0 ,0 ,0, 300.0);
    AztecasCarShield4=CreateObject(18637, 0, 0, 0 ,0 ,0 ,0, 300.0);
    if(vehicleid == AztecasTeamCar)
    {
        AttachObjectToVehicle(AztecasCarHeatSeeker1,vehicleid, 0.654999, 2.800016, 0.744999, 31.154989, -2.010001, -88.439956); //Object Model: 360 |
        AttachObjectToVehicle(AztecasCarHeatSeeker2,vehicleid, -0.539999, 2.800016, 0.744999, 31.154989, -2.010001, -88.439956); //Object Model: 360 |
        AttachObjectToVehicle(AztecasCarShield1,vehicleid, 0.904999, -4.615057, 0.669999, 90.449951, 358.785949, 2.009999); //Object Model: 18637 |
        AttachObjectToVehicle(AztecasCarShield2,vehicleid, 0.409999, -4.615057, 0.669999, 90.449951, 358.785949, 2.009999); //Object Model: 18637 |
        AttachObjectToVehicle(AztecasCarShield3,vehicleid, -1.314998, -4.615057, 0.669999, 90.449951, 358.785949, 2.009999); //Object Model: 18637 |
        AttachObjectToVehicle(AztecasCarShield4,vehicleid, -0.819999, -4.615057, 0.669999, 90.449951, 358.785949, 2.009999); //Object Model: 18637 |
    }
    return 1;
}
pawn Код:
AztecasTeamCar=AddStaticVehicleEx(455,1730.40002441,-1854.59997559,14.00000000,270.00000000,-1,-1,15); //Flatbed

No errors, but ingame, The objects don't get fucking attached.
Reply
#2

I think it has to do with that "object index" thing or something..
I don't understand it too, because , when i used a random object index, i got a strange metal bar thing around my car..

Not sure if it's that though, try checking that, and maybe the wiki has an answer(if you didn't visited it yet)
Reply
#3

OnVehicleSpawn is only called when the vehicle re-spawns.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
OnVehicleSpawn is only called when the vehicle re-spawns.
Omfg, thank you so much! I made a simple command for RCON admins called /armbombcars and it WORKED! wow, love ya man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)