Download Luar/moonloader/lib/SFlua/game.lua from andy-gg/LUAR_RP_PC: direct link, hf CLI and curl.
- Browser
- Download file 947 Bytes
-
https://huggingface.co/datasets/andy-gg/LUAR_RP_PC/resolve/main/Luar/moonloader/lib/SFlua/game.lua
- Command line
-
hf download hf://datasets/andy-gg/LUAR_RP_PC/Luar/moonloader/lib/SFlua/game.lua
-
curl -L -o game.lua https://huggingface.co/datasets/andy-gg/LUAR_RP_PC/resolve/main/Luar/moonloader/lib/SFlua/game.lua
947 Bytes
| --[[ | |
| Project: SF.lua <https://github.com/imring/SF.lua> | |
| License: MIT License | |
| Author: imring | |
| ]] | |
| local sampapi = require 'sampapi' | |
| local shared = require 'sampapi.shared' | |
| local ffi = shared.ffi | |
| local game = sampapi.require('CGame', true) | |
| function sampGetMiscInfoPtr() | |
| return shared.get_pointer(game.RefGame()) | |
| end | |
| jit.off(sampGetMiscInfoPtr, true) | |
| function sampToggleCursor(show) | |
| game.RefGame():SetCursorMode(show and ffi.C.CURSOR_LOCKCAM or ffi.C.CURSOR_NONE, show) | |
| if not show then | |
| game.RefGame():ProcessInputEnabling() | |
| end | |
| end | |
| jit.off(sampToggleCursor, true) | |
| function sampIsCursorActive() | |
| return game.RefGame().m_nCursorMode ~= ffi.C.CURSOR_NONE | |
| end | |
| jit.off(sampIsCursorActive, true) | |
| function sampGetCursorMode() | |
| return game.RefGame().m_nCursorMode | |
| end | |
| jit.off(sampGetCursorMode, true) | |
| function sampSetCursorMode(mode) | |
| game.RefGame().m_nCursorMode = mode | |
| end | |
| jit.off(sampSetCursorMode, true) |