• Print

Author Topic: A better noclip for admins  (Read 37640 times)

0 Members and 1 Guest are viewing this topic.

Offline Hyperion

  • Newbie
  • *
  • Posts: 30
  • Karma: 0
A better noclip for admins
« on: July 10, 2013, 06:02:54 am »
I want the noclip to work a little bit better for admins, so that when sbox_noclip is set to 0, then admins who have the noclip command enabled can just press V and fly, like it was at ASSMod. I know I can do 'bind v "ulx noclip"' in console, but sometimes I get into servers with no ULX and I would have to rebind everytime

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: A better noclip for admins
« Reply #1 on: July 10, 2013, 07:34:32 am »
In assmod they would have had to overwrite the noclip function at the core level to achieve this. This is not what ULX was meant to do. There are quite a few unbound keys in gmod. Maybe bind another key to ulx noclip?

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: A better noclip for admins
« Reply #2 on: July 10, 2013, 06:01:54 pm »
I want the noclip to work a little bit better for admins, so that when sbox_noclip is set to 0, then admins who have the noclip command enabled can just press V and fly, like it was at ASSMod. I know I can do 'bind v "ulx noclip"' in console, but sometimes I get into servers with no ULX and I would have to rebind everytime

Try putting this code in your lua/autorun folder.

Code: [Select]
hook.Add( "PlayerNoClip", "ULXNoclipConversion", function(ply)
ply:ConCommand("ulx noclip")
end)
I cry every time I see that I am not a respected member of this community.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: A better noclip for admins
« Reply #3 on: July 11, 2013, 09:12:21 am »
Try putting this code in your lua/autorun folder.

Code: [Select]
hook.Add( "PlayerNoClip", "ULXNoclipConversion", function(ply)
ply:ConCommand("ulx noclip")
end)

You should really just query the player directly instead of running the command if you want to go this route. By doing the query, you won't break client side prediction. :P
Experiencing God's grace one day at a time.

Offline Hyperion

  • Newbie
  • *
  • Posts: 30
  • Karma: 0
Re: A better noclip for admins
« Reply #4 on: August 10, 2013, 09:06:55 am »
You should really just query the player directly instead of running the command if you want to go this route. By doing the query, you won't break client side prediction. :P

So what do you suggest? Can you give me the better code? And I have to put it in the ULX lua/autorun folder in addons, right?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: A better noclip for admins
« Reply #5 on: August 10, 2013, 09:47:45 am »
Use the same hook, you just want to go based off what the following call returns:

Code: Lua
  1. ply:query("ulx noclip")
Experiencing God's grace one day at a time.

Offline nofear1999

  • Newbie
  • *
  • Posts: 30
  • Karma: 0
Re: A better noclip for admins
« Reply #6 on: December 13, 2013, 12:57:57 pm »
(I know I'm bumping an old thread but I have a suggestion)
Instead of binding just ulx noclip, or noclip. why not bind both to the same button?
bind v "ulx noclip;noclip"

  • Print