Skip to main content

Native

enum NativeReturnType

NativeReturnType = {
NONE = 0,
BOOL = 1,
INT = 2,
FLOAT = 3,
STRING = 4,
VECTOR3 = 5
}

native.invoke

Invokes a game native function using its hash. This function is a wrapper for calling in-game script functions.

  • Parameters
NameTypeDescription
return_typeNativeReturnTypeThe title of the popup.
idintegerThe content of the popup.
  • Return
TypeDescription
anyThe result of the native function call. The type of the result depends on the return_type.
  • Methods:
    • native.invoke(return_type, id, ...)

native.is_invoker_ready

Checks if the native function invoker is ready for calling script functions.

  • Return
TypeDescription
booleanTrue if native functions can be called via the invoker, false otherwise.
  • Methods:
    • native.is_invoker_ready()

native.get_native_name

Retrieves the simple name of a native function based on its hash. This function returns only the function name without namespace or any additional qualifiers.

  • Parameters
NameTypeDescription
hashintegerThe hash identifier of the native function.
  • Return
TypeDescription
stringThe simple name of the native function if found, empty string otherwise.
  • Methods:
    • native.get_native_name(hash)

native.get_native_name_full

Retrieves the full name of a native function based on its hash. This function returns the fully qualified name including any namespaces and additional qualifiers.

  • Parameters
NameTypeDescription
hashintegerThe hash identifier of the native function.
  • Return
TypeDescription
stringThe full name of the native function if found, empty string otherwise.
  • Methods:
    • native.get_native_name_full(hash)

native.get_native_namespace

print(namespace) -- Output: PLAYER

  • Parameters
NameTypeDescription
hashintegerThe hash identifier of the native function.
  • Return
TypeDescription
stringThe namespace of the native function if found, empty string otherwise.
  • Methods:
    • native.get_native_namespace(hash)