• Print

Author Topic: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?  (Read 15810 times)

0 Members and 1 Guest are viewing this topic.

Offline Jaden Zepeda

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Is there anyway I can disable players being able to hold c and change there playermodels in gmod sandbox, I want them to only be able to get playermodels through pointshop.

Offline Jaden Zepeda

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?
« Reply #1 on: December 16, 2014, 10:05:13 am »
Anyone?

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?
« Reply #2 on: December 16, 2014, 10:29:28 am »
Firstly, calm down. Your post has only been on for like an hour so the odds of having a reply already would be low. Second, in Sandbox Gamemode to my knowledge there is no way to disable the menu, but I believe you can use the code:
Code: Lua
  1. GM.Config.enforceplayermodel = true
Once you get to know me, you'll find you'll have never met me at all.

Offline Jaden Zepeda

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?
« Reply #3 on: December 16, 2014, 10:31:49 am »
Sorry, for that.
Anyway I am VERY new to ULX and Lua, so i don't know how to input Lua Code.
How do I add this code to my server?
« Last Edit: December 16, 2014, 10:56:15 am by Jaden Zepeda »

Offline Jaden Zepeda

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?
« Reply #4 on: December 16, 2014, 12:18:20 pm »
Firstly, calm down. Your post has only been on for like an hour so the odds of having a reply already would be low. Second, in Sandbox Gamemode to my knowledge there is no way to disable the menu, but I believe you can use the code:
Code: Lua
  1. GM.Config.enforceplayermodel = true
Alright, tried running it and got:
http://i.imgur.com/M422NRF.png

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?
« Reply #5 on: December 16, 2014, 03:28:39 pm »
Put it in your config.lua file
Once you get to know me, you'll find you'll have never met me at all.

Offline Tristan Parker

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • Physgun enthusiast
Hate to reopen an antiquated post, but where exactly is config.lua? Searched my entire GMod directory and couldn't find it. Again, sorry for wasting time if it was a really simple solution.
"A man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth."
~ Oscar Wilde

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
I'm pretty sure config.lua and GM.Config.enforceplayermodel are specific to DarkRP, not Sandbox.

I'm just eyeballing here, but I believe if you remove gamemode/editor_player.lua from the mix, the Player Model menu should disappear.  Best approach would be to rem out the include for it..

gamemode/shared.lua:
Code: Lua
  1.   Sandbox Gamemode
  2.  
  3.   This is GMod's default gamemode
  4.  
  5. -----------------------------------------------------------]]
  6.  
  7. include( "player_extension.lua" )
  8. include( "persistence.lua" )
  9. include( "save_load.lua" )
  10. include( "player_class/player_sandbox.lua" )
  11. include( "drive/drive_sandbox.lua" )
  12. -- include( "editor_player.lua" )
  13.  

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
And Tristan, you waking up older post is "ok" in this situation, as you asked a question not already answered, and brought new information to it.
We appreciate you keeping an eye out to try to not do that though.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Loganphx1

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?
« Reply #9 on: October 26, 2016, 05:19:17 pm »
I have removed the player model selector from Sandbox but whenever I equip a playermodel in pointshop the playermodel doesn't change.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sandbox Gmod ULX Server, Disable players ability to switch playermodels?
« Reply #10 on: October 26, 2016, 06:22:42 pm »
Logan, you can't remove one without affecting all lower addons, functions or gamemodes that use it.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print