Auto car spawn
#1

when im driving a car everything is fine, after i exit the car and i'm waiting like 30 seconds the car got respawned..
where do i find this code?
Reply
#2

Which script are you using ?
Reply
#3

It's old script which i updated to 0.3e and i fixed all the bugs i just want to remove this autorespawn
Reply
#4

why function create your cars?
AddStaticVehicle or AddStaticVehicleEx ?
Reply
#5

i have Ex and normal too
Reply
#6

Read these:
https://sampwiki.blast.hk/wiki/CreateVehicle
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx

NOTE: How these both have a respawn_delay parameter, you just need to change this to what you want.
For example, your line would look something like this:
pawn Код:
AddStaticVehicleEx(522, 124.1, 593.24, 0.32, 180.0, 14, 0, 30);
Note how the number at the end is 30? The final number represents the respawn_delay parameter. So if you don't want the car to respawn, change it to -1. If you want it to respawn in 2 minutes or so, (2 minutes = 60 seconds x 2 = 120) you would change it to 120.

Example of creating a car that NEVER respawns:
pawn Код:
AddStaticVehicleEx(522, 12, 412, 14.2, 150.1, 155, 252, -1);
Example of creating a car that respawns in 6 MINUTES.
1 Minute = 60 seconds
6 Minutes = 60 seconds x 6
60 x 6 = 360
pawn Код:
AddStaticVehicleEx(522, 12, 412, 14.2, 150.1, 155, 252, 360);
Reply
#7

I have this car:
AddStaticVehicle(596,1601.0724,-1684.0154,5.6107,89.0640,0,1);
but it still spawns
Reply
#8

Read this:
https://sampwiki.blast.hk/wiki/AddStaticVehicle

There is no respawn_delay parameter for AddStaticVehicle, I was explaining AddStaticVehicleEx to you.
Reply
#9

Ok, thanks i just changed all cars to staticex.
you can close this thread
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)