SA-MP Forums Archive
The Cars respawn, but why? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: The Cars respawn, but why? (/showthread.php?tid=274784)



The Cars respawn, but why? - xXGaryXx - 07.08.2011

Hi!
My Problem is that all cars in my server respawn after a few minutes. This is not so good because i have an rl server. The cars are added with AddStaticVehicle..., and a few of them with SetVehicleNumberPlate(AddStaticVehicle...
Thanks for helping!


Re: The Cars respawn, but why? - ServerRestart - 07.08.2011

Use AddStaticVehicleEx, You can set a timer for the cars to respawn.


Re: The Cars respawn, but why? - Shockey HD - 07.08.2011

Quote:
Originally Posted by ServerRestart
Посмотреть сообщение
Use AddStaticVehicleEx, You can set a timer for the cars to respawn.
Extending ServerRestarts answer,

Take a look at this.

https://sampwiki.blast.hk/wiki/AddStaticVehicleEx

This will teach you more of AddStaticVehicleEx


pawn Код:
(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay)



AW: The Cars respawn, but why? - xXGaryXx - 07.08.2011

Okay so if i want that they never respawn I can do it like this? AddStaticVehicleEx(596,1529.6339,-1683.7720,5.6124,270.5692, 29, 29, 99999);


Re: The Cars respawn, but why? - Shockey HD - 07.08.2011

You can always destroy the vehicle. Take a look at this.

https://sampwiki.blast.hk/wiki/DestroyVehicle

Instead of AddStaticVehicleEx i would use CreateVehicle. (if you wouldn't want the car to spawn back)


AW: The Cars respawn, but why? - xXGaryXx - 07.08.2011

okay i said this the wrong way... what i mean is: i go with a police car to a 24/7, i get out of the car then I wait a few minutes and suddenly my car is away. it's now again at the police department. but i dont want this. and i dont want to destroy the vehicle.


Re: AW: The Cars respawn, but why? - Shockey HD - 07.08.2011

Quote:
Originally Posted by xXGaryXx
Посмотреть сообщение
okay i said this the wrong way... what i mean is: i go with a police car to a 24/7, i get out of the car then I wait a few minutes and suddenly my car is away. it's now again at the police department. but i dont want this. and i dont want to destroy the vehicle.
So, your telling me (Correct me if im wrong) You DO NOT Want the car to disappear?

Try your code to see if it works i guess.

pawn Код:
AddStaticVehicleEx(596,1529.6339,-1683.7720,5.6124,270.5692, 29, 29, 99999);



AW: The Cars respawn, but why? - xXGaryXx - 07.08.2011

Yes this is exactly what I mean^^ okay ill try it...