diff --git a/server/src/events/Main.cpp b/server/src/events/Main.cpp index c9474107..e11d3d29 100644 --- a/server/src/events/Main.cpp +++ b/server/src/events/Main.cpp @@ -13,6 +13,7 @@ #include "cpp-sdk/events/CMetaDataChangeEvent.h" #include "cpp-sdk/events/CClientDeleteObjectEvent.h" #include "cpp-sdk/events/CClientRequestObjectEvent.h" +#include "cpp-sdk/events/CGivePedScriptedTaskEvent.h" using alt::CEvent; using EventType = CEvent::Type; @@ -253,3 +254,15 @@ V8_LOCAL_EVENT_HANDLER clientRequestObject(EventType::CLIENT_REQUEST_OBJECT_EVEN args.push_back(V8Helpers::JSValue(ev->GetModel())); args.push_back(resource->CreateVector3(ev->GetPosition())); }); + +V8_LOCAL_EVENT_HANDLER givePedScriptedTask(EventType::GIVE_PED_SCRIPTED_TASK, + "givePedScriptedTask", + [](V8ResourceImpl* resource, const CEvent* e, std::vector>& args) + { + auto ev = static_cast(e); + v8::Isolate* isolate = resource->GetIsolate(); + + args.push_back(resource->GetBaseObjectOrNull(ev->GetSource())); + args.push_back(resource->GetBaseObjectOrNull(ev->GetTarget())); + args.push_back(V8Helpers::JSValue(ev->GetTaskType())); + }); diff --git a/shared/deps/cpp-sdk b/shared/deps/cpp-sdk index 39491dfe..e0e0ca39 160000 --- a/shared/deps/cpp-sdk +++ b/shared/deps/cpp-sdk @@ -1 +1 @@ -Subproject commit 39491dfe9d8ee552d03666dcd4962020aac742e2 +Subproject commit e0e0ca39bf9cb738ae53ab10b0b6b6b923bd85a1