Jump to content

Recommended Posts

Posted

It would be very interesting to be able to catch low level events like CEventVehicleCollision, CEventVehicleDamage and CEventExplosion. FiveM have implemented that.

My suggestion would be something like (Client-Side):

mp.events.add('OnLowLevelEvent', function (eventName, eventArgs) {
	
});

eventName would be a normal string with the name of the event.

eventArgs as an array of arguments that this event returns.

I think this could be made by hooking GET_EVENT_DATA native, but I am not sure tho.


Lastly, this would open new interesting features, like being able to save vehicle damage deformation in a database and etc.

Posted

Well, RAGE's code it's not based on online code like the mod you're talking about, so you can't pretend to be to same copies.

About the events, you already have the vehicle damage one and you will be able to get the vehicle damage in 1.1 DP2.

Posted (edited)

Although FiveM is based on online code, this particually feature has nothing to do with it because those events get triggered offline as well. I am sure Rage does some hooking, maybe the built-in damage event is done this way. So, saying that it's impossible or it can't be done just because it exists on Fivem is nosense.

Furthermore, I didn't know that this feature of vehicle damage exists in DP2. Thats already good then.

Edited by Pilatus
Posted

Цитата

mp.events.add('OnLowLevelEvent', function (eventName, eventArgs) {
	
});

 It's better to do something like that:

Цитата

mp.events.lowlevel.add('onEventName', function (eventArgs, ...) {
	
});

 

Posted
On 5/1/2020 at 11:51 AM, Solpadoin said:

 

 It's better to do something like that:

 

It may be, but the problem is that there are a lot low level events, like 30 or so. I do think it would be better optimized to do all in one event and let the developer filter by him-self.

The thing about Low Level Event is that it opens a lot of good possibilities with rage. I am sure It would be a great addiction, the problem is that I don't even know if the suggestion here are read by developers, so even being a good idea it may never be even consider.

Posted

That "low-level" events are basically AI events used by SP/MP GTA V scripts and it must be available through vanilla natives:

  • GET_EVENT_AT_INDEX
  • GET_EVENT_DATA (1.1 supports passing array buffers through natives)
  • GET_NUMBER_OF_EVENTS

 

Making it working out of RAGE Multiplayer's built in events system would be a way more performant approach though and it's been taken into consideration.

  • Like 7

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...