Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Latest commit

 

History

History
27 lines (25 loc) · 1.12 KB

Hook.md

File metadata and controls

27 lines (25 loc) · 1.12 KB

This API is returned by Sandbox:Load. To use it override these functions with your own.

bool override, Variant overrideValue Hook:OnGetIndex(Context context, Variant tbl, Variant tblIndex, Variant tblValue)

overrideValue is the value that gets returned if override is true. Note: Values are still protected

bool override, Variant overrideValue Hook:OnSetIndex(Context context, Variant tbl, Variant tblIndex, Variant tblValue)

overrideValue is what the value gets set to if override is true

bool override, Variant overrideProtected Hook:OnProtectValue(Context context, Variant index, Variant value, Variant protectedValue)

overrideProtected is what is returned if override is true. value is the original value. protectedValue is the protected value.

bool override, Variant overrideProtected Hook:OnProtectFunction(Context context, Variant index, Variant value, Variant protectedValue)

overrideProtected is what is returned if override is true.

Example

function hook:OnGetIndex(context, tbl, index, value)
	if index == "anIndex" then
		return true, "ACustomValue"
	end
end