Comments (7)
Fyi that won't do anything unless the server has really bad code trusting the client because you can't modify serverside files.
You can see the file structure for where hook.lua
should go
Also you could just modify the functions themselves, ie doing
debug.getregistry()["Player"].IsAdmin = function() return true end
from autorun-rs.
@Vurv78 The server I am on actually does have bad code, I did it with another script and I was able to access the custom debug menus.
And thank you, I will do what you suggested now
from autorun-rs.
Also you could just modify the functions themselves, ie doing
debug.getregistry()["Player"].IsAdmin = function() return true end
So with this, what would the updated hook.lua be then?
from autorun-rs.
You wouldn't need hook.lua
if you did that, would just be using autorun.lua
.
Also just found out that is a completely lua function that uses Entity:GetNWString
internally, so you would actually do something like
local Entity = debug.getregistry().Entity
local old = Entity.GetNWString
function Entity:GetNWString(key, fallback)
if key == "UserGroup" and self == LocalPlayer() then return "superadmin" end
return old(self, key, fallback)
end
from autorun-rs.
Thank you, I will see if this works.
from autorun-rs.
@Vurv78 Yup this works. Thank you! What would I have to add if I wanted to change ConVar's? (example: TestingMode = CreateConVar( "gmt_testing", 0, { FCVAR_ARCHIVE, FCVAR_DONTRECORD, FCVAR_REPLICATED }, "GMT testing mode" )
) Is this even possible?
from autorun-rs.
Assuming it's implemented in C, CreateConVar returns a ConVar object, you can override the value a convar has by changing the methods like ConVar:GetInt()
depending on ConVar:GetName()
.
Also ideally if you just want to mess with specific server scripts you could still use hook.lua
to return modified versions of the scripts you manually make so you don't need to deal with hooking all these functions.
from autorun-rs.
Related Issues (20)
- Async File IO HOT 1
- Autorun.require but for binary modules
- Command to clear console HOT 1
- Plugins 2.0 (and Plugins Workshop)
- Check for updates HOT 1
- Proper filesystem
- Terminal colors don't work on windows 7 HOT 5
- Support native lua modules with ``Autorun.requirebin``
- Menu Presence / ROC / ROM HOT 1
- Replace ``systray(x)`` with ``trayicon``
- Be able to refresh a script continuously HOT 3
- Linux Support HOT 4
- Exploit HOT 1
- lua dumps server filename HOT 1
- Create new action in actions? HOT 3
- lua_openscript_cl does not open/run lua scripts HOT 4
- Can you execute lua scripts with x32 autorun? HOT 3
- Crashes on startup with most recent x86 update HOT 1
- The option in settings.toml to autoload
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorun-rs.