Vehicle destruction respawn delay -
matejdro - 30.08.2011
Hello!
After vehicle is destroyed, it will be re spawned immediately. Is there a way to set delay on this?
AW: Vehicle destruction respawn delay -
Joshua_Turnerz - 30.08.2011
yup ... Destroy and delete the vehicle, then recreate based on a ticker.
Re: Vehicle destruction respawn delay -
=WoR=G4M3Ov3r - 30.08.2011
Quote:
Originally Posted by Joshua_Turnerz
yup ... Destroy and delete the vehicle, then recreate based on a ticker.
|
Or did you mean a timer ?
Re: Vehicle destruction respawn delay -
Tigerbeast11 - 30.08.2011
No need for timers etc.
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
AW: Vehicle destruction respawn delay -
Joshua_Turnerz - 30.08.2011
no, Ticker ... Timers = Evil!
Most cores usually already have a timer running based on 1 second intervals ... ists easy enough, to simply use that existing timer, add a variable ticker, to kick off a function.
As you've seen in my core, I avoid timers as much as possible.
Re: Vehicle destruction respawn delay -
knackworst - 30.08.2011
Can't u just change the spawn time when adding a static vehicle? (or createvehicle?)
that's pretty much the easiest way...
Re: AW: Vehicle destruction respawn delay -
=WoR=G4M3Ov3r - 30.08.2011
Quote:
Originally Posted by Joshua_Turnerz
no, Ticker ... Timers = Evil!
Most cores usually already have a timer running based on 1 second intervals ... ists easy enough, to simply use that existing timer, add a variable ticker, to kick off a function.
As you've seen in my core, I avoid timers as much as possible.
|
Then he can easily use AddStaticVehicleEx
Re: Vehicle destruction respawn delay -
Tigerbeast11 - 30.08.2011
Errrmmm.. Guys, I was first to talk about AddStaticVehicleEx :P
Re: Vehicle destruction respawn delay -
=WoR=G4M3Ov3r - 30.08.2011
Quote:
Originally Posted by Tigerbeast11
Errrmmm.. Guys, I was first to talk about AddStaticVehicleEx :P
|
Correction, wiki.sa-mp.com was the first to talk about it, actually.. lol
AW: Vehicle destruction respawn delay -
Joshua_Turnerz - 30.08.2011
because your limiting your options...
lets say, after a car blows up ... you want it gone for like 1 hour ...
you can simply loop any array, and check for a timestamp that is out of date, then recreate the vehicle based on those saved variables.
Its pointless to have timers floating around for an hour, not to mention the possibility of all the timer collisions ..