How to make a vehicle not to respawn after death?
#1

I want a script, that after a vehicle dies, that means after then vehicle health becomes 0, the vehicle to stay at that position and never to respawn again. That means after a vehicle blows, it will stay there forever as the broken car without respawning as a new car. I tried using -1 in 'respawn_delay' of CreateVehicle, but that didn't work. It just respawned the vehicle. So, can anyone help me out?
Reply
#2

Hmm, I got an idea for this.
When the vehicle gets damaged, make it like.. Make it something like this:
pawn Код:
GetVehicleHealth(veh, health);
    if(health <250) return SetVehicleHealth(veh, 250);
You get the idea, when the vehicle health becomes lower than 250, it will set it to 250..
This is an idea to make it broken and not respawn(But make sure you make it not controllable).
Reply
#3

Quote:
Originally Posted by JimmyCh
Посмотреть сообщение
Hmm, I got an idea for this.
When the vehicle gets damaged, make it like.. Make it something like this:
pawn Код:
GetVehicleHealth(veh, health);
    if(health <250) return SetVehicleHealth(veh, 250);
You get the idea, when the vehicle health becomes lower than 250, it will set it to 250..
This is an idea to make it broken and not respawn(But make sure you make it not controllable).
No, I want to make it look like the blown up car. Like the empty car it become after getting blow up.
I want to make it look like this:
http://t0.gstatic.com/images?q=tbn:A...b3Sje2R9fQ&t=1
http://gtablog.com/wp-content/upload...en-shots-7.jpg
Reply
#4

As far as I know, that's not possible.
It's a SA issue, they made it blow up and disappear, I don't think you can do that.
Unless there is an object like that, then you can do something like:
Car health is 0, CreateObject at that place, you get the idea?
Reply
#5

Quote:
Originally Posted by JimmyCh
Посмотреть сообщение
As far as I know, that's not possible.
It's a SA issue, they made it blow up and disappear, I don't think you can do that.
Unless there is an object like that, then you can do something like:
Car health is 0, CreateObject at that place, you get the idea?
Um yeh... :/
Reply
#6

Well you can make it by having a loop for all the cars and if the car has less then 250 hp then make a timer for the explosion to occour, delete the car and replace it with the blown up car object or w/e it is.

hope this helpd
Reply
#7

OR, I got a good idea.
CreateExplosion on the inside of the car, if the health is less than 250, and make the health 250.
So even with the explosion, it will stay at 250 at all times.
Also make the explosion create some fire, would look nice and do you what you wanted.
Reply
#8

Quote:
Originally Posted by JimmyCh
Посмотреть сообщение
OR, I got a good idea.
CreateExplosion on the inside of the car, if the health is less than 250, and make the health 250.
So even with the explosion, it will stay at 250 at all times.
Also make the explosion create some fire, would look nice and do you what you wanted.
But the vehicle wouldn't look that empty style and be rusty... D:
Nevermind, just forget about this.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)