SA-MP Forums Archive
cars 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: cars respawn (/showthread.php?tid=664295)



cars respawn - PoniStar - 24.02.2019

hi guyz ! so i want to some cars never respawn after they death (onvehicledeath) so if i set the respawn delay on -1 will it work how i want ? for exp i have this car :
Код:
Car[playerid] = CreateVehicle(411, x,y,z, a, -1, -1,-1);
and now , when its destroy by fire or ... it will not respawn again right !?


Re: cars respawn - Hazon - 24.02.2019

Obviously not according to the parameter, https://sampwiki.blast.hk/wiki/CreateVehicle

Quote:

respawn_delay The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning




Re: cars respawn - PoniStar - 24.02.2019

so what should i do ?! if i destroy the vehicle on vehicledeath it will disapear suddenly , after getting a rocket shoot for exp [explosion] and destroy without getting fire


Re: cars respawn - David (Sabljak) - 24.02.2019

Well.. you can use something like OnVehicleDeath

vehicledestroyed[vehid] = 1;

and on vehiclespawn check if vehicledestroyed[vehid] == 1 then do DestroyVehicle?