Arivia
Browse ScriptsDownload RLIB
v3.x
v3.x
  • Introduction
  • Select Version
  • Showcase
  • Changelog
    • ◾3.0.0.6-beta
    • ◾3.0.0.5-beta
    • ◾3.0.0.4-beta
    • ◾3.0.0.3-beta
    • ◾3.0.0.2-beta
    • ◾3.0.0.1-alpha
  • FAQ
    • ◾Add Food Categories
    • ◾Addon Won't Show
    • ◾Incompatible Addons
    • ◾Custom Category Colors
    • ◾Hide Unavailable Jobs
    • ◾Modified Script
    • ◾Refunds
    • ◾Script Errors
    • ◾When Are Updates?
  • ❱ Setup
    • ◾Install
    • ◾Verify
    • ◾Workshop
    • ◾Docs/Web
  • ❱ Configuration
    • ◾Env
    • ◾Fonts
    • ◾Languages
    • ◾Settings
      • sh_4_tabs.lua
        • bUseModelImage
        • styleB
    • ◾Visual Blueprints
  • ❱ First Use
    • ◾Binds
    • ◾Console Commands
      • ▸arivia.listjobs
      • ▸arivia.getjob
      • ▸arivia.setjob
  • ❱ Developers
    • ◾Jobs
      • ▸Parameters
        • tip
        • NeedJob
        • NeedGroup
      • ▸Sorting
    • ◾Entities
      • ▸accent
      • ▸allowed
      • ▸customHideUnavail
      • ▸level
      • ▸prestige
      • ▸price
      • ▸tip
    • ◾Food
      • ▸category
    • ◾Categories
      • ▸tip
  • ❱ Internal
    • ◾Rules
    • ◾Web Demo
  • ❱ DOC REFERENCES
    • ◾Status
Powered by GitBook
On this page
  • Alias
  • Source
  • Requires
  • Type
  • Info
  • Example
  • Output
  • Notes
  1. ❱ Developers
  2. Entities

▸level

Assigns a certain level that a player must be in order to buy the item

Alias

level, lvl

Source

added in Arivia v3

Requires

compatible level / xp addon

Type

integer

Info

Providing the level field to an entity will force players to be that particular level before they can buy the item.

Example

DarkRP.createEntity( 'Tip Jar',
{
    ent         = 'darkrp_tip_jar',
    model       = 'models/props_lab/jar01a.mdl',
    price       = 5,
    max         = 2,
    cmd         = 'tipjar',
    level       = 4,
} )
DarkRP.createEntity( 'Tip Jar',
{
    ent         = 'darkrp_tip_jar',
    model       = 'models/props_lab/jar01a.mdl',
    price       = 5,
    max         = 2,
    cmd         = 'tipjar',
    lvl         = 4,
} )

Output

If a player views an entity with a level requirement that the player does not meet; the entity will be faded in the menu:

The player will also be given an error message:

Notes

If you wish to enable or disable the level plugin all-together on Arivia; you must open lua\modules\arivia\cfg\sh_13_plugins.lua and modify cfg.plugins.levels

Previous▸customHideUnavailNext▸prestige

Last updated 4 years ago

◾
Example of entity when player does not have needed level requirement
Example of selected entity when player does not have needed level requirement