PivityGmodStore

How to limit a category/prop to a level?

You can add a customcheck depending on the level, here is how to do (with this leveling system : https://github.com/uen/Leveling-System).

  1. Go to the file : addons\advanced-spawnmenu\lua\advanced-spawnmenu\sh_config.lua
  2. Add a customcheck depending on the level, here is the example to check if the level is 25 or more.
CFG.CustomChecks[ "Level 25" ] = {
msg = "%s is limited to players at least level 25.",
func = function( pPlayer )
return (pPlayer:getDarkRPVar("level") or 0) >= 25
end 
}
  1. You can now use the customcheck in the configuration menu in-game. (after a game restart)