SkullBreaker Posted March 2, 2014 Share 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 Link to comment
cheez3d Posted March 2, 2014 Share Posted March 2, 2014 addEventHandler("onVehicleExplode",root,function() destroyElement(source) end) Link to comment
Anubhav Posted March 2, 2014 Share 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) Link to comment
WhoAmI Posted March 2, 2014 Share Posted March 2, 2014 Source in this event is an element which have been destroyed, in this case vehicle. Link to comment
Karuzo Posted March 2, 2014 Share 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. Link to comment
Moderators Citizen Posted March 2, 2014 Moderators Share 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. Link to comment
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