ULX

Author Topic: Ultimate Client Limits Menu for ULX 1.1  (Read 8475 times)

0 Members and 1 Guest are viewing this topic.

Offline andrejkw

  • Newbie
  • *
  • Posts: 6
  • Karma: 1
Ultimate Client Limits Menu for ULX 1.1
« on: February 20, 2006, 05:56:31 PM »
Client Limits Menu for ULX 1.1

Description:
A nice menu for administration of Client Limits.

Installation:
1.) Copy the code below into a Lua File (climits.lua).
2.) Copy the Lua File (climits.lua) to your ulx/modules directory.
3.) Enjoy! You can also configure the amounts of the options by changing OPTION_AMOUNTS.

Code: [Select]
------------------------------------------------
-- Client Limits Menu for ULX 1.1 by andrejkw --
------------------------------------------------

OPTION_AMOUNTS = { "5", "10", "20", "30", "40" }

if ( ULX_VERSION <= 1.0 ) then
    _Msg( "WARNING: You must be running ULX v1.1 or better.\n" )
end
 
function addLimitOptionToMenu( iPlayer, sOption, sCvar )
    _spawnmenu.AddItem( iPlayer, "[ULX] Client Limits", "@" .. sOption, "" )
    _spawnmenu.AddItem( iPlayer, "[ULX] Client Limits", "+" .. sOption .. " Off", "ulx_rcon " .. sCvar .. " 0" )
   
    for i, v in OPTION_AMOUNTS do
        _spawnmenu.AddItem( iPlayer, "[ULX] Client Limits", "+" .. v .. " " .. sOption, "ulx_rcon " .. sCvar .. " ".. v )
    end
end   
   
function PlayerSendClientLimitsMenu( iPlayer )
    if ( hasAccess( iPlayer, ACCESS_RCON ) == false ) then
        return
    end
   
    addLimitOptionToMenu( iPlayer, "Balloons", "gm_sv_clientlimit_balloons" )
    addLimitOptionToMenu( iPlayer, "Effects", "gm_sv_clientlimit_effects" )
    addLimitOptionToMenu( iPlayer, "Emitters", "gm_sv_clientlimit_emitters" )
    addLimitOptionToMenu( iPlayer, "Props", "gm_sv_clientlimit_props" )
    addLimitOptionToMenu( iPlayer, "Ragdolls", "gm_sv_clientlimit_ragdolls" )
    addLimitOptionToMenu( iPlayer, "Sprites", "gm_sv_clientlimit_sprites" )
    addLimitOptionToMenu( iPlayer, "Thrusters", "gm_sv_clientlimit_thrusters" )
    addLimitOptionToMenu( iPlayer, "Wheels", "gm_sv_clientlimit_wheels" )
    addLimitOptionToMenu( iPlayer, "NPCs", "gm_sv_clientlimit_npcs" )
    addLimitOptionToMenu( iPlayer, "Vehicles", "gm_sv_clientlimit_vehicles" )
    addLimitOptionToMenu( iPlayer, "Dynamites", "gm_sv_clientlimit_dynamite" )
end

HookEvent( "eventPlayerInitialSpawn", PlayerSendClientLimitsMenu )
« Last Edit: February 21, 2006, 01:58:30 PM by andrejkw »

Offline Golden-Death

  • Hero Member
  • *****
  • Posts: 751
  • Karma: 0
  • Honored Lua Scripter
    • BlueFire
Re: Ultimate Client Limits Menu for ULX 1.1
« Reply #1 on: February 21, 2006, 08:44:25 PM »
Image from FP studios of the menu:




Offline Nighthawk

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Ultimate Client Limits Menu for ULX 1.1
« Reply #2 on: February 22, 2006, 02:26:53 PM »
 8) Sweet

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Ultimate Client Limits Menu for ULX 1.1
« Reply #3 on: February 22, 2006, 07:48:23 PM »
Indeed!
Experiencing God's grace one day at a time.