Sign in to follow this  
AlirezaPlus

Exipre After Blow Car

Recommended Posts

Hello friends

Please help me respond quickly.

I do not get out of the car after the blast when I make the car, and the car blows up on a busy map and busy.

I do not know what I mean or not, but I do this photo to find out what I'm saying.


As you can see, this car remains and does not go after bursting.

Share this post


Link to post
15 minutes ago, AlirezaPlus said:

I do not know what I mean

so do we, also the picture isn't here

Share this post


Link to post
18 hours ago, Ayush Rathore said:

Client Side:


addEventHandler("onClientVehicleExplode", getRootElement(), function() destroyElement(source) end)

Server Side:


function deleteVehicleOnBurst()
   destroyElement(source)
end
addEventHandler("onVehicleExplode", getRootElement(), deleteVehicleOnBurst)

This should do the trick. 😉

 

I am a beginner, please tell me where to write or add?

Share this post


Link to post
13 hours ago, AlirezaPlus said:

I am a beginner, please tell me where to write or add?

First go to your mta sa directory by right clicking on short cut and clicking open file location and then open server/mods/deathmatch/resources/

Make a new folder named eab.

In this folder make three files meta.xml, c.lua, s.lua.

In c.lua paste 

13 hours ago, AlirezaPlus said:

in s.lua paste

13 hours ago, AlirezaPlus said:
  1.  
  2. function deleteVehicleOnBurst()
  3. destroyElement(source)
  4. end
  5. addEventHandler("onVehicleExplode", getRootElement(), deleteVehicleOnBurst)



Now in meta.xml

<meta>
	<info author="AlirezaPlus" description="Expire after blow" version="1.5" type="script" />
	<script src="c.lua" type="client"/>
	<script src="s.lua" type="server"/>
</meta>

Now go to this server gui window and type start eab.

7CQuVnJ.png

This is how you will do it. 😉

 

 

 

 

 

Edited by Ayush Rathore
  • Thanks 1

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.