Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DarkRP can tool doesn't work correctly #13

Closed
MattJeanes opened this issue Jul 25, 2017 · 33 comments
Closed

DarkRP can tool doesn't work correctly #13

MattJeanes opened this issue Jul 25, 2017 · 33 comments
Assignees

Comments

@MattJeanes
Copy link
Owner

CanTool hook seems to return false in DarkRP for some reason meaning the sonic can't link with the TARDIS and do other things.

@reede2
Copy link

reede2 commented Jul 26, 2017

this is import as if users want to park there tardis and lock it from outside they cant and that means its easyer for people to steal their tardis

@reede2
Copy link

reede2 commented Jan 16, 2018

so will this be fixed soon my players get annoyed as there tardis can be stolen

@MattJeanes
Copy link
Owner Author

You might be able to help me out with fixing it, do you know if admins/superadmins are still able to use the sonic correctly? Just not normal players

@reede2
Copy link

reede2 commented Jan 16, 2018

what do you mean none of the ranks can unlock or lock from the outside or link

@MattJeanes
Copy link
Owner Author

Not even admins/superadmins? I don't know if you server has any admin roles or anything

@reede2
Copy link

reede2 commented Jan 16, 2018

not even admins can lock the tardis door it works when its a tardis from q

@reede2
Copy link

reede2 commented Jan 16, 2018

we use ulx

@MattJeanes
Copy link
Owner Author

Can you run this in your server console and let me know what it says?

lua_run PrintTable(hook.GetTable()["CanTool"])

E.g.

] lua_run PrintTable(hook.GetTable()["CanTool"])
> PrintTable(hook.GetTable()["CanTool"])...
PreventToolingOfRagdoll	=	function: 0x20ef0500
SPropProtection.CanTool	=	function: 0x20f8dc28
TARDISInt-CanTool	=	function: 0x215aaee8
no_removing_cars	=	function: 0x22786ff8

@reede2
Copy link

reede2 commented Jan 16, 2018

> PrintTable(hook.GetTable()["CanTool"])...
APG_canTool	=	function: 0x21b24c58
DoorExploit	=	function: 0x21b39e90
FAdmin_Log	=	function: 0x21a2ab30
FAdmin_jailed	=	function: 0x21b40ac8
FPP.Protect.CanTool	=	function: 0x21bedb70
PermaPropsTool	=	function: 0x218b3f08
SA_DontTouchYourself	=	function: 0x0f24bc20
ULibEntToolCheck	=	function: 0x21180470
ULibPlayerToolCheck	=	function: 0x0ca8b498
blogs_m_Toolgun_toolused	=	function: 0x22b0ee40

@MattJeanes
Copy link
Owner Author

Okay there's a way to override it which may be useful, what are you looking for - people to only be able to sonic their own tardis? Everyone able to sonic everyone's? Something else?

@reede2
Copy link

reede2 commented Jan 16, 2018

i want it so they can lock there own tardis doors

@reede2
Copy link

reede2 commented Jan 17, 2018

how do we overide it

@MattJeanes
Copy link
Owner Author

MattJeanes commented Jan 17, 2018

If you create a file in your gmod folder, called something like:
addons/sonic-override/lua/weapons/swep_sonicsd/modules/sv_override.lua

And have the contents be:

print("Sonic override enabled")
SWEP:AddHook("CanTool", "override", function(self, ply, ent)
	if ent:GetClass() == "gmod_tardis" and ent:GetCreator()==ply then
		return true
	end
end)

Then hopefully that will work, let me know

@reede2
Copy link

reede2 commented Jan 17, 2018

where do i put it i set it out like that nothing happened

@MattJeanes
Copy link
Owner Author

How exactly did you set it out? This should be on your server

@reede2
Copy link

reede2 commented Jan 17, 2018

i made a directry like that so addons/sonic-override/lua/weapons/swep_sonicsd/modules/sv_override.lua

@MattJeanes
Copy link
Owner Author

ok did you put that in your server files and reboot the server?

@reede2
Copy link

reede2 commented Jan 17, 2018

yer

@reede2
Copy link

reede2 commented Jan 18, 2018

why didnt it work

@MattJeanes
Copy link
Owner Author

Can you show a screenshot of the file in it's folder? Also try the updated version of the code in my comment above and see if you get any messages in the server console when trying to sonic the tardis and make sure you check for any errors in the server console related to that file

@reede2
Copy link

reede2 commented Jan 18, 2018

@MattJeanes
Copy link
Owner Author

MattJeanes commented Jan 18, 2018

Are you on linux? The start of that path, addons should be a folder inside your garrysmod server files e.g.
/home/steam/steamapps/common/garrysmod/garrysmod/addons/sonic-override/lua/weapons/swep_sonicsd/modules/sv_override.lua

@reede2
Copy link

reede2 commented Jan 18, 2018

i am using a host

@reede2
Copy link

reede2 commented Jan 18, 2018

no errors in console relating to it

@MattJeanes
Copy link
Owner Author

Okay, and no output when trying to lock it with the sonic? Where is the addons folder in your host, there should be a folder called garrysmod near the root with folders like lua, models, materials and addons - that's where this should be in.

@reede2
Copy link

reede2 commented Jan 18, 2018

like when you try to lock it does nothing and its in garrysmod addons folder

@MattJeanes
Copy link
Owner Author

Can you try to update the file with the edited version above, reboot your server and see if it displays anything in the server console when trying to sonic it and see if it says Sonic override enabled when the server starts

@reede2
Copy link

reede2 commented Jan 18, 2018

yer i seen Sonic override enabled in console

@MattJeanes
Copy link
Owner Author

Okay does it show anything in the server console when you try to sonic anything?

@reede2
Copy link

reede2 commented Jan 18, 2018

Weapon [130][swep_sonicsd] Player [1][[MV] Reede]

ServerLog: [FAdmin] Reede (STEAM_0:1:62039985) Attempted to use tool

@MattJeanes
Copy link
Owner Author

Ah okay, that makes sense thanks - I've edited the script above again, can you try that one? Again show me the same output from the server console when you sonic it if it doesn't work, but hopefully it does now.

@reede2
Copy link

reede2 commented Jan 18, 2018

OMG ITS WORKS !!!!!!!!!!!!!!!!

@MattJeanes
Copy link
Owner Author

Amazing, okay great - I've edited the script once more to remove the output in the server console if you want to update it. I'll close this issue and leave that script there as a workaround for anyone who wants to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants