Обновить Lua API

pavetr
2026-08-19 18:06:50 +00:00
parent bd345af848
commit d43f5135f9

@@ -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):
![Menu screenshot](https://dev.pavetr.ru/uploads/fatal_docs/lua_api_menu.png)
- 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/>
![User view](https://dev.pavetr.ru/uploads/fatal_docs/fatal_screengrab_user.png)
And when admin takes screenshot:
<br/>
![Admin view](https://dev.pavetr.ru/uploads/fatal_docs/fatal_screengrab_admin.png)