Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: darkdeath on February 13, 2006, 12:30:12 PM

Title: Need some simple help with a code!
Post by: darkdeath on February 13, 2006, 12:30:12 PM
plz anyone who knows lua good tell me:
here below is the code:
Quote
      if _GetConVar_Bool( "6" ) then
         _MaxPlayers( userid, "Set 6 players", "6", )
      else
         _MaxPlayers( userid, "Set 10 players", "6", )
      end

How can i make this code work thats my question?
btw: its for the "ulx_menus.lua" i am adding some more options.
Title: Re: Need some simple help with a code!
Post by: Megiddo on February 13, 2006, 01:13:56 PM
_MaxPlayers doesn't accept any parameters, and you cannot change the maxplayers while running a server
Title: Re: Need some simple help with a code!
Post by: darkdeath on February 13, 2006, 10:39:09 PM
oh thats a pitty
are there any codes who worK ?..
like the weapon codes ?
Title: Re: Need some simple help with a code!
Post by: darkdeath on February 15, 2006, 11:04:29 AM
can someone TELL ME THAT ?...
Title: Re: Need some simple help with a code!
Post by: Megiddo on February 15, 2006, 06:18:11 PM
There is no way you can change maxplayers without restarting the server
Title: Re: Need some simple help with a code!
Post by: darkdeath on February 16, 2006, 02:05:28 AM
no i don't mean that but can i use other codes beginning with "_" (under squore)
thats what i ment to say..
Title: Re: Need some simple help with a code!
Post by: Megiddo on February 16, 2006, 06:21:39 AM
http://gmwiki.garry.tv/index.php/Category:Lua_Bindings
Title: Re: Need some simple help with a code!
Post by: darkdeath on February 16, 2006, 01:07:39 PM
yea i mean that could i use one of those for examle in your script and how ?...
just 1 example the rest i try to figure out my self ..
Title: Re: Need some simple help with a code!
Post by: Megiddo on February 16, 2006, 01:12:23 PM
You could use _spawnmenu.RemoveAll( userid_you_want ) to remove that userid's prop menu
Title: Re: Need some simple help with a code!
Post by: darkdeath on February 17, 2006, 06:01:26 AM
THATS PRETTY COOL :)

edit:but how to set all the menu's again ?

   
Quote
elseif choice == ID_GETALLMENU then
      _spawnmenu.All( target, "steamid" )
Title: Re: Need some simple help with a code!
Post by: darkdeath on February 18, 2006, 07:59:46 AM
does any one know that ?