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

0 Members and 2 Guests 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: 2728
  • 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?

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given