SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/08/2011, 12:00 AM   #1
matejdro
Little Clucker
 
Join Date: Jan 2009
Posts: 25
Reputation: 0
Default Vehicle destruction respawn delay

Hello!

After vehicle is destroyed, it will be re spawned immediately. Is there a way to set delay on this?
matejdro is offline   Reply With Quote
Old 30/08/2011, 12:01 AM   #2
Joshua_Turnerz
Banned
 
Join Date: Aug 2011
Posts: 43
Reputation: 8
Default AW: Vehicle destruction respawn delay

yup ... Destroy and delete the vehicle, then recreate based on a ticker.
Joshua_Turnerz is offline   Reply With Quote
Old 30/08/2011, 12:01 AM   #3
=WoR=G4M3Ov3r
High-roller
 
Join Date: Nov 2010
Location: www.Ambrosia-Servers.com
Posts: 1,752
Reputation: 329
Default Re: Vehicle destruction respawn delay

Quote:
Originally Posted by Joshua_Turnerz View Post
yup ... Destroy and delete the vehicle, then recreate based on a ticker.
Or did you mean a timer ?
=WoR=G4M3Ov3r is offline   Reply With Quote
Old 30/08/2011, 12:03 AM   #4
Tigerbeast11
Gangsta
 
Join Date: Aug 2009
Posts: 771
Reputation: 2
Default Re: Vehicle destruction respawn delay

No need for timers etc.

http://wiki.sa-mp.com/wiki/AddStaticVehicleEx
Tigerbeast11 is offline   Reply With Quote
Old 30/08/2011, 12:03 AM   #5
Joshua_Turnerz
Banned
 
Join Date: Aug 2011
Posts: 43
Reputation: 8
Default AW: Vehicle destruction respawn delay

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.
Joshua_Turnerz is offline   Reply With Quote
Old 30/08/2011, 12:04 AM   #6
knackworst
Gangsta
 
knackworst's Avatar
 
Join Date: Sep 2010
Location: Belgium
Posts: 913
Reputation: 27
Default Re: Vehicle destruction respawn delay

Can't u just change the spawn time when adding a static vehicle? (or createvehicle?)
that's pretty much the easiest way...
knackworst is offline   Reply With Quote
Old 30/08/2011, 12:06 AM   #7
=WoR=G4M3Ov3r
High-roller
 
Join Date: Nov 2010
Location: www.Ambrosia-Servers.com
Posts: 1,752
Reputation: 329
Default Re: AW: Vehicle destruction respawn delay

Quote:
Originally Posted by Joshua_Turnerz View Post
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
=WoR=G4M3Ov3r is offline   Reply With Quote
Old 30/08/2011, 12:06 AM   #8
Tigerbeast11
Gangsta
 
Join Date: Aug 2009
Posts: 771
Reputation: 2
Default Re: Vehicle destruction respawn delay

Errrmmm.. Guys, I was first to talk about AddStaticVehicleEx :P
Tigerbeast11 is offline   Reply With Quote
Old 30/08/2011, 12:09 AM   #9
=WoR=G4M3Ov3r
High-roller
 
Join Date: Nov 2010
Location: www.Ambrosia-Servers.com
Posts: 1,752
Reputation: 329
Default Re: Vehicle destruction respawn delay

Quote:
Originally Posted by Tigerbeast11 View Post
Errrmmm.. Guys, I was first to talk about AddStaticVehicleEx :P
Correction, wiki.sa-mp.com was the first to talk about it, actually.. lol
=WoR=G4M3Ov3r is offline   Reply With Quote
Old 30/08/2011, 12:10 AM   #10
Joshua_Turnerz
Banned
 
Join Date: Aug 2011
Posts: 43
Reputation: 8
Default AW: Vehicle destruction respawn delay

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 ..
Joshua_Turnerz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Perfect UnoccupiedVehicle Destruction - Ares Vehicle Destruction Rapgangsta Filterscripts 25 17/08/2011 02:10 AM
AddVehicleEx and CreateVehicle respawn delay beckzy Bug Reports 1 02/01/2011 09:55 AM
Respawn cars delay. SeQualX Help Archive 10 07/12/2010 07:21 PM
Vehicle Respawn Dave1972 Help Archive 1 10/02/2010 08:44 AM
Vehicle Not Respawn StrickenKid Help Archive 2 15/07/2009 01:46 AM


All times are GMT. The time now is 09:10 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.