3
3
4
4
#include " cpp-sdk/events/CPlayerChangeAnimationEvent.h"
5
5
#include " cpp-sdk/events/CPlayerChangeInteriorEvent.h"
6
+ #include " cpp-sdk/events/CPlayerDimensionChangeEvent.h"
6
7
7
8
using EventType = alt::CEvent::Type;
8
9
@@ -20,7 +21,6 @@ V8_LOCAL_EVENT_HANDLER animationChange(EventType::PLAYER_CHANGE_ANIMATION_EVENT,
20
21
args.emplace_back (V8Helpers::JSValue (ev->GetNewAnimationName ()));
21
22
});
22
23
23
-
24
24
V8_LOCAL_EVENT_HANDLER playerInteriorChange (EventType::PLAYER_CHANGE_INTERIOR_EVENT,
25
25
" playerInteriorChange" ,
26
26
[](V8ResourceImpl* resource, const alt::CEvent* e, std::vector<v8::Local<v8::Value>>& args)
@@ -32,3 +32,15 @@ V8_LOCAL_EVENT_HANDLER playerInteriorChange(EventType::PLAYER_CHANGE_INTERIOR_EV
32
32
args.emplace_back (V8Helpers::JSValue (ev->GetOldInteriorLocation ()));
33
33
args.emplace_back (V8Helpers::JSValue (ev->GetNewInteriorLocation ()));
34
34
});
35
+
36
+ V8_LOCAL_EVENT_HANDLER playerDimensionChange (EventType::PLAYER_DIMENSION_CHANGE,
37
+ " playerDimensionChange" ,
38
+ [](V8ResourceImpl* resource, const alt::CEvent* e, std::vector<v8::Local<v8::Value>>& args)
39
+ {
40
+ auto ev = static_cast <const alt::CPlayerDimensionChangeEvent*>(e);
41
+ v8::Isolate* isolate = resource->GetIsolate ();
42
+
43
+ args.push_back (resource->GetBaseObjectOrNull (ev->GetTarget ()));
44
+ args.push_back (V8Helpers::JSValue (ev->GetOldDimension ()));
45
+ args.push_back (V8Helpers::JSValue (ev->GetNewDimension ()));
46
+ });
0 commit comments