♾️
InfinityPulse
🎮 Discord📺 Youtube🛒 Tebex
  • Introduction
  • RedM
    • 🌿Herbalist System
      • Installation
      • Commands
      • Herbalist Skills
    • ⭕Company Blips
      • Installation
      • Config
    • ⚔️Bandits Ambush
      • Installation
      • Config
    • 📖XP System
      • Installation
      • Types
      • Exports
      • UI Additions
  • 💬Alert Dialogue
    • Installation
    • Exort
  • FiveM
    • 🌟VIP System
      • Installation
      • Exports
    • 💱Money Laundering
      • Configuration
      • Server/Framework support
  • DATA TABLE
    • Export
  • 📦Crate Drop
    • Installation
    • Configuration
  • 💬3D Text UI
    • Installation
    • Configuration
    • Exports
  • 📺City Hall
    • Installation
    • Configuration
Powered by GitBook
On this page
Edit on GitHub
  1. RedM
  2. XP System

Exports

For the people that actually have to set up the script with the rest of the server

Exports

MAP:

  • NAME: citizenId / job.name / gang.name

  • XPTYPE: The name of the type you are using, defined in the shared/sconfig.lua file.

  • AMOUNT: An integer amount or the string 'auto'.

  • typeMult: The multiplier that will be applied.

Note: All exports work based on the specified name & type.

To use an export, use this format:

exports['ip_xpsystem']:AddXP(src, xpType, 'auto', 1)

Available Exported Functions:

[CL]/[SV] GetLevel(name, xpType)

  • Returns the integer value of the level.

[CL]/[SV] GetXP(name, xpType)

  • Returns the integer value of experience.

[SV] GetLimit(name, xpType)

  • Returns the total required XP to reach the next level (not the remaining amount).

[SV] AddXP(src, xpType, amount, typeMult)

  • Adds XP to the person with the source specified for the given xpType.

  • amount can be an integer or 'auto'.

  • If typeMult is skipped, the multiplier defaults to 1.

[SV] RemoveXP(src, xpType, amount)

  • Removes XP from the person with the source specified for the given xpType.

  • amount can be an integer or 'auto'.

PreviousTypesNextUI Additions

Last updated 1 month ago

📖