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(car1, 1010);
AddVehicleComponent(car1, 1074);
AddVehicleComponent(car1, 1067);
AddVehicleComponent(car1, 1162); // jester alien spoiler
AddVehicleComponent(car1, 1160); // jester alien front bumper
AddVehicleComponent(car1, 1159); // jester alien rear bumper
ChangeVehiclePaintjob(car1, 2); //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).