Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2024, 11:53:26 PM
Home Help Login Register
News: Zombie Master 2 discussion

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: How to disable Prop possession on one map only?
Pages: [1]
Author Topic: How to disable Prop possession on one map only?  (Read 5558 times)
Buah
Poster

Posts: 6


« on: October 07, 2011, 01:57:49 PM »

Title. Players often kill other players on dm_richland using cars and such while they are on spectate. I don't want disable Prop possession on all maps.
I'v tried creating dm_richland.cfg (with ttt_spec_prop_control 0) and placing it to maps/cfg dir but it does not seem to work on gmod.
Does anyone have any ideas how to solve this prop-problem?
Anonymous
Poster

Posts: 126


« Reply #1 on: October 07, 2011, 03:59:55 PM »

Simple Answer: STAY AWAY FROM THE CARS.

Problem Solved.

Buah
Poster

Posts: 6


« Reply #2 on: October 07, 2011, 04:17:07 PM »

Simple Answer: STAY AWAY FROM THE CARS.

Problem Solved.

Not really. What if you are taking cover from shooting traitors? Problem not solved. Ofc propkillers can always be banned, but it doesn't solve the problem in long run.
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #3 on: October 07, 2011, 05:58:04 PM »

You could use a tiny Lua script that checks when the map has loaded if it is richland, and sets the cvar to 0 if so.

Something like:
local function richlandtime()
  if game.GetMap() == "dm_richland" then
     RunConsoleCommand("ttt_spec_prop_control", "0")
  end
end
hook.Add("Initialize", "richlandtime", richlandtime)


Put in a Lua file (eg. "richlandtime.lua") on the server in the /garrysmod/lua/autorun/server/ directory.
« Last Edit: October 08, 2011, 06:54:06 AM by Bad King Urgrain »
Buah
Poster

Posts: 6


« Reply #4 on: October 07, 2011, 08:18:37 PM »

You could use a tiny Lua script that checks when the map has loaded if it is richland, and sets the cvar to 0 if so.

Something like:
local function richlandtime()
  if game.getMap() == "dm_richland" then
      RunConsoleCommand("ttt_spec_prop_control", "0")
  end
end
hook.Add("Initialize", "richlandtime", richlandtime)


Put in a Lua file (eg. "richlandtime.lua") on the server in the /garrysmod/lua/autorun/server/ directory.


Doesen't work..
Quote
ERROR: Hook 'richlandtime' Failed: [lua/autorun/server/richlandtime.lua:2] attempt to call field 'getMap' (a nil value)
Removing Hook 'richlandtime'
JoTheShmo
Poster

Posts: 214



« Reply #5 on: October 07, 2011, 09:48:04 PM »

Change it from getMap to GetMap
I assume it was just a typo
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #6 on: October 08, 2011, 06:54:27 AM »

Yep, fixed it in my post now.
Buah
Poster

Posts: 6


« Reply #7 on: October 08, 2011, 06:27:00 PM »

Yeah, it works now. Thanks.
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: How to disable Prop possession on one map only? « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.01 seconds with 17 queries.