Cars Respawning Too Fast? +REP
#1

There has got to be something to delay my cars respawning. So when I exit out my vehicle for a 5-10 seconds, I the car respawns back to its original place. How do I delay my cars from respawning in game? And I'm talking about every car, each car does this. +REP.
Reply
#2

I'm guessing you're using AddStaticVehicleEx, so.

What I do is add a new line at the top with;

pawn Код:
#define never 9999999999999 (This number will be the amount of time the vehicle respawns)
And at the end of each AddStaticVehicleEx, there's a number of some sort, and just replace it with never. It's what I do, you don't NEED to define never.

Just at the end change the number.

pawn Код:
AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay)
Respawn_delay is what you need to change.
Reply
#3

iLcke, -1 works.

Just set respawn_delay in AddStaticVehicleEx/CreateVehicle to -1. That prevents respawning.
Reply
#4

How can I set it to 10 minutes? And is there a faster way to do it to set at timer for all cars at once?
Reply
#5

respawn_delay is in seconds, so set it to 60*10.
Reply
#6

Okay thanks MP2 and is there a way to set it for all vehicle instead of putting it next to each vehicle line?
Reply
#7

You could use a define

#define RESPAWN_DELAY 60*10

Then just put that at the end of all your CreateVehicle lines.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)