1. Post #1
    EvacX's Avatar
    July 2010
    2,610 Posts
    All right, so currently I have the following code:

    function setMaxVel(ply, cmd, args)
    	local Settings = {}
    	Settings.MaxVelocity = args[1]
    	physenv.SetPerformanceSettings(Settings)
    
    	MsgN("Phys settings changed")
    end
    
    function setMaxAngVel(ply, cmd, args)
    	local Settings = {}
    	Settings.MaxAngularVelocity = args[1]
    	physenv.SetPerformanceSettings(Settings)
    
    	MsgN("Phys settings changed")
    end
    
    concommand.Add("phys_vel", setMaxVel)
    concommand.Add("phys_angvel", setMaxAngVel)

    I put it on my server in the "garrysmod/garrysmod/lua" folder called "script.lua"
    When I'm on my server I do "rcon lua_openscript script.lua" and it prints it's running the script.
    Then I can do stuff like "rcon phys_vel 30000", and it prints "Phys settings changed", but nothing changes (Props are still limited to some ~2000 velocity) and I have no idea why so that's why I'm asking for help.

  2. Post #2
    Gold Member
    Hyper Iguana's Avatar
    March 2011
    700 Posts
    Have you checked if the convar was changed? (sv_maxvelocity, etc.)

  3. Post #3

    April 2012
    64 Posts
    Isnt source's velocity limit ALOT lower than 30000?

  4. Post #4
    EvacX's Avatar
    July 2010
    2,610 Posts
    It didn't change, however if I just did something like:
    Settings = {}
    Settings.MaxVelocity = 36000
    physenv.SetPerformanceSettings(Settings)
    

    And I run that script, then it does work.

  5. Post #5

    July 2007
    864 Posts
    I'm quite sure arguments from concommands are strings.. Try tonumber() around args[1] in both concommands.
    Reply With Quote Edit / Delete Reply Windows 7 Denmark Show Events Agree Agree x 1Lua Helper Lua Helper x 1 (list)