ULX

Author Topic: Need some simple help with a code!  (Read 6121 times)

0 Members and 3 Guests are viewing this topic.

Offline darkdeath

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
Need some simple help with a code!
« 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.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Need some simple help with a code!
« Reply #1 on: February 13, 2006, 01:13:56 PM »
_MaxPlayers doesn't accept any parameters, and you cannot change the maxplayers while running a server
Experiencing God's grace one day at a time.

Offline darkdeath

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
Re: Need some simple help with a code!
« Reply #2 on: February 13, 2006, 10:39:09 PM »
oh thats a pitty
are there any codes who worK ?..
like the weapon codes ?

Offline darkdeath

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
Re: Need some simple help with a code!
« Reply #3 on: February 15, 2006, 11:04:29 AM »
can someone TELL ME THAT ?...

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Need some simple help with a code!
« Reply #4 on: February 15, 2006, 06:18:11 PM »
There is no way you can change maxplayers without restarting the server
Experiencing God's grace one day at a time.

Offline darkdeath

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
Re: Need some simple help with a code!
« Reply #5 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..

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Experiencing God's grace one day at a time.

Offline darkdeath

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
Re: Need some simple help with a code!
« Reply #7 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 ..

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Need some simple help with a code!
« Reply #8 on: February 16, 2006, 01:12:23 PM »
You could use _spawnmenu.RemoveAll( userid_you_want ) to remove that userid's prop menu
Experiencing God's grace one day at a time.

Offline darkdeath

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
Re: Need some simple help with a code!
« Reply #9 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" )
« Last Edit: February 17, 2006, 02:48:26 PM by darkdeath »

Offline darkdeath

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
Re: Need some simple help with a code!
« Reply #10 on: February 18, 2006, 07:59:46 AM »
does any one know that ?