mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-12-11 10:37:18 +01:00
Expose functionality to emit custom entity events.
This commit is contained in:
@@ -116,6 +116,15 @@ void CBlip::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CBlip::CustomEvent(Int32 header, Object & payload) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Perfrom the requested action
|
||||
Core::Get().EmitBlipCustom(m_ID, header, payload);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CBlip::GetWorld() const
|
||||
{
|
||||
@@ -304,6 +313,7 @@ void Register_CBlip(HSQUIRRELVM vm)
|
||||
.Prop(_SC("Active"), &CBlip::IsActive)
|
||||
// Core Methods
|
||||
.Func(_SC("Bind"), &CBlip::BindEvent)
|
||||
.Func(_SC("CustomEvent"), &CBlip::CustomEvent)
|
||||
// Core Overloads
|
||||
.Overload< bool (CBlip::*)(void) >(_SC("Destroy"), &CBlip::Destroy)
|
||||
.Overload< bool (CBlip::*)(Int32) >(_SC("Destroy"), &CBlip::Destroy)
|
||||
|
||||
Reference in New Issue
Block a user