Need help with blocking a console command on the client,
The command in question being: fading_door_mat pp/copy
As it can be used to color players screens using the fading door tool.
Unfortunately I have no idea where to start and google didn't help.
if SERVER then
concommand.Add
end
I have this bit of code
if SERVER then
concommand.Remove("fading_door_mat pp/copy")
end
where would I put the file though?
You would be better off using SANDBOX/CanTool and checking the tool gun data, example of this can be found at DarkRP/core.lua at fd95cf68e6a01a1b0522c4a989d4512fc0fb202d · FP..
I'm not trying to blacklist the tool itself, i'm trying to block a console command that comes with the fading door tool.
The example I sent you does just that, you can verify that the material isn't set to pp/copy, just as DarkRP does for the default material tool
So all I have to do is delete the "pp/copy" line in the core.lua file?
Nevermind I found a workaround by editing the fading door tools lua file.
Would do you mind in sharing this in case someone needs help in the future? Like that would be a nice move from you and would stress out someone that has the same problem...
Sure, no problem.
All I did was use GMAD to extract this workshop addon
https://steamcommunity.com/sharedfiles/filedetails/?id=407236638
and then edited the single lua file you'll find like so:
Delete line 7 which would be - TOOL.ClientConVar["mat"] = "sprites/heatwave"
Once you delete that line you won't be able to access the materials from the materials list on the fading door tool but nobody will be able to use the console command fading_door_mat - It's a sacrifice but it's one I can accept to be honest as I can't find another way to workaround this problem.
For your convenience since after you delete that line of code the fading doors material will be the same as the prop so if you want to give fading doors a material go to line 261 which would be self.fadeDoorMaterial = self.fadeDoorMaterial or "sprites/heatwave" | change this line to self.fadeDoorMaterial = "addwhatevermaterialyouwanthere"
And that is my workaround for this stupid exploit.
Sorry, you need to Log In to post a reply to this thread.