SA-MP Forums Archive
Vehicle not spawning with Component after respawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle not spawning with Component after respawn (/showthread.php?tid=607614)



Vehicle not spawning with Component after respawn - codeshadow - 21.05.2016

Vehicle not spawning with component after being destroyed and respawning.
PHP код:
new car1;
OnGameModeInit();
              
car1 AddStaticVehicle(559,1012.4022,-660.4001,120.8174,31.9998,2,2); //Jester 
             
AddVehicleComponent(car11010);
             
AddVehicleComponent(car11074);
             
AddVehicleComponent(car11067);
             
AddVehicleComponent(car11162); // jester alien spoiler
              
AddVehicleComponent(car11160); // jester alien front bumper
              
AddVehicleComponent(car11159); // jester alien rear bumper
             
ChangeVehiclePaintjob(car12);  //paintjob 



Re: Vehicle not spawning with Component after respawn - Konstantinos - 21.05.2016

Components of a vehicle are not added when the vehicle respawns, you will have to add them yourself in OnVehicleSpawn (after checking that vehicleid is car1).