Update README.md

This commit is contained in:
Lorraxs 2023-12-10 04:51:14 +07:00
parent bf1221578d
commit cddb2ff6ad

View File

@ -55,24 +55,9 @@ Config.Dev = false
Config.Nui = true -- will wait NUI trigger RegisterNUICallback('AppReady', ...) before init
```
# Hook method
```lua
impl:HookMethod(methodName, hookFunc) --hookFunc must return args from reciver
```
## example:
```lua
local hud = main:GetImpl("Hud")
hud:HookMethod("ShowHUD", function(this, ...)
main:LogInfo("ShowHud was called")
return(...)
end)
```
# Export all method from all modules
# This boilerplate will export all method from all modules
- To call method in module out side of script
```lua
exports['lr_addon']:ImplCall(name, func, ...) --Call a method in module external
```