mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-19 16:47:14 +02:00
Expose functionality to emit custom entity events.
This commit is contained in:
@ -125,6 +125,15 @@ void CVehicle::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CVehicle::CustomEvent(Int32 header, Object & payload) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Perfrom the requested action
|
||||
Core::Get().EmitVehicleCustom(m_ID, header, payload);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CVehicle::IsStreamedFor(CPlayer & player) const
|
||||
{
|
||||
@ -1652,6 +1661,7 @@ void Register_CVehicle(HSQUIRRELVM vm)
|
||||
.Prop(_SC("Active"), &CVehicle::IsActive)
|
||||
// Core Methods
|
||||
.Func(_SC("Bind"), &CVehicle::BindEvent)
|
||||
.Func(_SC("CustomEvent"), &CVehicle::CustomEvent)
|
||||
// Core Overloads
|
||||
.Overload< bool (CVehicle::*)(void) >(_SC("Destroy"), &CVehicle::Destroy)
|
||||
.Overload< bool (CVehicle::*)(Int32) >(_SC("Destroy"), &CVehicle::Destroy)
|
||||
|
Reference in New Issue
Block a user