Difference between revisions of "WD2 ScriptHook: Lua Functions"
From Nomad DB
(Created page with " == Generic == * include == Script == * Script() * ScriptHook.RegisterKeyHandler == UI == * UI.SimpleMenu") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[WD2 ScriptHook|ScriptHook]] registers custom [[Lua]] functions to the game's scripting system. These functions extend the [[WD2 Lua Functions|built-in Lua functions]] and [[WD2 Lua Classes|Game classes]] and provide additional functionality. | ||
− | == Generic == | + | ==Generic== |
− | |||
+ | *[[include]] | ||
− | == Script == | + | ===Script=== |
− | |||
− | |||
− | == UI == | + | *[[WD2 ScriptHook: Script Table|Script()]] |
− | * [[UI.SimpleMenu]] | + | *[[ScriptHook.RegisterKeyHandler]] |
+ | *[[ScriptHook.RegisterCommand]] | ||
+ | |||
+ | ===UI=== | ||
+ | |||
+ | *[[UI.SimpleMenu]] | ||
+ | *[[UI.SimpleTextInput]] | ||
+ | *[[ScriptHook.ShowNotification]] | ||
+ | *[[ScriptHook.IsIngameUIEnabled]] | ||
+ | |||
+ | ==Game Functions== | ||
+ | ===Player=== | ||
+ | |||
+ | *[[ScriptHook.AddInventoryItem]] | ||
+ | *[[ScriptHook.Teleport]] | ||
+ | *[[ScriptHook.SetGraphicKitModel]] | ||
+ | *[[ScriptHook.SetLocalPlayerNoclip]] | ||
+ | *[[ScriptHook.HasLocalPlayerNoclip]] | ||
+ | |||
+ | ===Entity=== | ||
+ | |||
+ | *[[ScriptHook.SpawnEntityFromArchetypeHash]] | ||
+ | *[[ScriptHook.GetArchetypeHashByEntityId]] | ||
+ | *[[ScriptHook.GetGraphicKitModelByEntityId]] | ||
+ | *[[ScriptHook.SetEntityGraphicKitModel]] | ||
+ | *[[ScriptHook.GetAllEntities]] | ||
+ | *[[ScriptHook.GetEntitiesInRange]] | ||
+ | *[[ScriptHook.GetEntitiesWithComponent]] | ||
+ | *[[ScriptHook.GetEntityComponents]] | ||
+ | *[[ScriptHook.EntityHasComponent]] | ||
+ | *[[ScriptHook.GetEntityClassName]] | ||
+ | |||
+ | ===Vehicle=== | ||
+ | |||
+ | *[[ScriptHook.RepairLocalPlayerVehicle]] | ||
+ | |||
+ | ===Felony=== | ||
+ | |||
+ | *[[ScriptHook.ToggleFelonySystem]] | ||
+ | *[[ScriptHook.SetHeatLevel]] | ||
+ | *[[ScriptHook.ClearHeatLevel]] | ||
+ | |||
+ | ===Game=== | ||
+ | |||
+ | *[[ScriptHook.SetProgression]] | ||
+ | *[[ScriptHook.ToggleWorldSpawner]] | ||
+ | *[[ScriptHook.IsWorldSpawnerEnabled]] | ||
+ | *[[ScriptHook.ToggleWorldImpostor]] | ||
+ | *[[ScriptHook.IsWorldImpostorEnabled]] | ||
+ | |||
+ | ===Camera=== | ||
+ | |||
+ | *[[ScriptHook.CameraSetCustom]] | ||
+ | *[[ScriptHook.CameraReset]] | ||
+ | *[[ScriptHook.SetLocalPlayerFreeCamera]] | ||
+ | *[[ScriptHook.HasLocalPlayerFreeCamera]] | ||
+ | |||
+ | ==Utility== | ||
+ | ===timer=== | ||
+ | |||
+ | *[[timer.Create]] | ||
+ | *[[timer.Simple]] | ||
+ | *[[timer.Get]] | ||
+ | *[[timer.Remove]] | ||
+ | *[[timer.RemoveIfExists]] |
Revision as of 20:55, 2 August 2020
ScriptHook registers custom Lua functions to the game's scripting system. These functions extend the built-in Lua functions and Game classes and provide additional functionality.
Contents
Generic
Script
UI
Game Functions
Player
- ScriptHook.AddInventoryItem
- ScriptHook.Teleport
- ScriptHook.SetGraphicKitModel
- ScriptHook.SetLocalPlayerNoclip
- ScriptHook.HasLocalPlayerNoclip
Entity
- ScriptHook.SpawnEntityFromArchetypeHash
- ScriptHook.GetArchetypeHashByEntityId
- ScriptHook.GetGraphicKitModelByEntityId
- ScriptHook.SetEntityGraphicKitModel
- ScriptHook.GetAllEntities
- ScriptHook.GetEntitiesInRange
- ScriptHook.GetEntitiesWithComponent
- ScriptHook.GetEntityComponents
- ScriptHook.EntityHasComponent
- ScriptHook.GetEntityClassName
Vehicle
Felony
Game
- ScriptHook.SetProgression
- ScriptHook.ToggleWorldSpawner
- ScriptHook.IsWorldSpawnerEnabled
- ScriptHook.ToggleWorldImpostor
- ScriptHook.IsWorldImpostorEnabled
Camera
- ScriptHook.CameraSetCustom
- ScriptHook.CameraReset
- ScriptHook.SetLocalPlayerFreeCamera
- ScriptHook.HasLocalPlayerFreeCamera