SkullBreaker Posted March 2, 2014 Posted March 2, 2014 Hi guys. I want to make a script that if a vehicle is destroyed, it disappears. I know that I probably have to use: addEventHandler ( "onVehicleExplode" ) function vehdisappear ( ) destroyElement Could anyone help me out with this? Thanks
cheez3d Posted March 2, 2014 Posted March 2, 2014 addEventHandler("onVehicleExplode",root,function() destroyElement(source) end)
Anubhav Posted March 2, 2014 Posted March 2, 2014 Lol? It will destroy Source? addEventHandler("onVehicleExplode",root,function() local car = createVehicle(yourArguments) -- It will destroy this car. destroyElement(car) end)
WhoAmI Posted March 2, 2014 Posted March 2, 2014 Source in this event is an element which have been destroyed, in this case vehicle.
Karuzo Posted March 2, 2014 Posted March 2, 2014 @Anubhav: He wants that every car which will be exploded will be destroyed. And that would do WhoAmI's code. Your code would only destroy the car which he creates.
Moderators Citizen Posted March 2, 2014 Moderators Posted March 2, 2014 Np. Haha, you didn't help him at all. WhoAmI helped him. Your code wil do this: When a vehicle explode: Creates another one and immediatly delete this new car and it will be that fast that you won't see that new car and leaving the burned car on the road.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now