Author Topic: Two suggestions about max props  (Read 3127 times)

0 Members and 2 Guests are viewing this topic.

Offline werewolfpoop

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Two suggestions about max props
« on: April 10, 2007, 10:39:09 PM »
hi,
I have to suggestions that would be really nice to add in my opinion.
First:
Life Support and The SpaceBuild game mode are the big things right now, would it be possible for add support for it since it is essentially the SandBox game mode, except with a few extra entities, it would also be nice to be able to control the max entities for each of those from the admin menu.
Second:
Would it be possible for Admins and/or Super Admins to have a different max prop count than non-admin users?
That way I wouldn't have to limit myself to limit how much some person can spam onto my server.
What do you think of these ideas?
« Last Edit: April 20, 2007, 09:21:33 PM by werewolfpoop »

Offline werewolfpoop

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Two suggestions about max props
« Reply #1 on: April 24, 2007, 08:05:09 PM »
Ok, another question. Since I'm trying to add support my self for the Space build gamemode I went looking around and found: c

Code: [Select]
function ulx.showAdminMenu()
if GetConVarString( "sv_gamemode" ) ~= "sandbox" then
ULib.csay( LocalPlayer(), "Sorry, this menu is only available in sandbox mode." )
return

in cl_menu.lua  in garrysmod\garrysmod\lua\ulx
Now my question is, how would I rewrite that to say if not space build or sandbox, then display "Sorry, this menu is only available in sandbox or space build mode."

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Two suggestions about max props
« Reply #2 on: April 24, 2007, 08:20:16 PM »
Code: [Select]
unction ulx.showAdminMenu()
        local cur_mode = GetConVarString( "sv_gamemode" )
if  cur_mode ~= "sandbox" or "exact_mode_name_case_sensitive" then
ULib.csay( LocalPlayer(), "Sorry, this menu is only available in sandbox mode." )
return

Untested. Fill in 'exact_blah' with the exact game mode name.

EDIT: Sorry. Left out a 'then'.
Also, ULX v3.1 now supports any game based on sandbox
« Last Edit: May 11, 2007, 07:42:06 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline werewolfpoop

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Two suggestions about max props
« Reply #3 on: April 27, 2007, 04:30:10 PM »
Thank you very much!  ;D
EDIT: ARGH!!! It doesn't work!  :'(
With that code in, it won't even do anything whatsoever!
« Last Edit: April 29, 2007, 01:31:40 PM by werewolfpoop »