Обновить Lua API
38
Lua-API.md
38
Lua-API.md
@@ -1,3 +1,39 @@
|
||||
GM Fatal lua executor can run the common Garry's mod clientside or menuside lua code. But also it includes some custom methods.
|
||||
|
||||
Here will be the all custom lua methods.
|
||||
[Reference for Garry's mod Lua API](https://wiki.facepunch.com/gmod/)
|
||||
|
||||
## How to enable custom Lua API?
|
||||
Click on the corresponding checkbox in Lua tab and join the server (or reconnect if you was on server):
|
||||
|
||||

|
||||
|
||||
- What should I choose? The menu or client?
|
||||
- The menu state API is undetectable for gmod servers but it's very limited. Client state has rich functional but it can be easily detected (and server owner can do anything with the clientside-loaded functions - for example, create 9999 tabs in your cheat menu using custom API function)
|
||||
- Can I enable menu and clientside API together?
|
||||
- Yes
|
||||
|
||||
|
||||
Lua API is separated on Free and Premium (which can be used only in Premium version)
|
||||
|
||||
## Free Methods
|
||||
|
||||
## Premium Methods
|
||||
### ``fatal.being_screengrabbed() -> bool``
|
||||
This method returns if your screen is being screengrabbed by Admin or screenshoted.
|
||||
|
||||
**Example**
|
||||
```lua
|
||||
hook.Add("HUDPaint","my_cool_custom_esp",function()
|
||||
if not fatal.being_screengrabbed() then
|
||||
draw.SimpleText("This text is not visible on screengrab apps", "DermaLarge", ScrW()/2, ScrH()/2, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
end
|
||||
end)
|
||||
```
|
||||
|
||||
How it looks as user (you):
|
||||
<br/>
|
||||

|
||||
|
||||
And when admin takes screenshot:
|
||||
<br/>
|
||||

|
||||
Reference in New Issue
Block a user