Stevo Scripts
  • Stevo Scripts
  • stevo lib
    • 📚stevo_lib
      • Functions
        • Client Functions
        • Server Functions
      • Businesses
        • Logs
        • Server Functions
      • Skills
        • Server Functions
  • PAID SCRIPTS
    • 🔫stevo_claiming
      • Installation
      • Dependencies
    • 🚗stevo_dmv
      • Installation
        • Items
      • Dependencies
      • Exports
    • 👮stevo_police
      • Installation
      • Exports
      • Dependencies
    • 🔓stevo_prison
      • Installation
        • Items
      • Dependencies
      • Config
      • Exports
    • 💰stevo_supporter
    • 🚠stevo_vendors
      • Installation
      • Configuration
      • Dependencies
    • 🏢stevo_dealerships
      • Installation
      • Dependencies
      • Adding Vehicles
  • FREE SCRIPTS
    • 📦stevo_cayocrates
      • Installation
      • Dependencies
    • 🪓stevo_chopshop
      • Installation
      • Dependencies
    • 🛂stevo_citizenship
      • Installation
      • Dependencies
    • 🌱stevo_drugsell
      • Installation
      • Dependencies
    • 📋stevo_feedback
      • Installation
      • Dependencies
    • 🍎stevo_fruitpicking
      • Installation
        • Items
      • Dependencies
    • 👮‍♀️stevo_policebadge
      • Installation
        • Items
      • Dependencies
    • 🛠️stevo_portablecrafting
      • Installation
        • Items
      • Dependencies
    • 🧼stevo_portablemoneywash
      • Installation
        • Items
      • Dependencies
    • 🚔stevo_jobgarages
      • Installation
      • Dependencies
    • 👻stevo_trickortreat
      • Installation
        • Items
      • Dependencies
    • 🍇stevo_advancedvineyard
      • Installation
        • Items
      • Dependencies
    • 🚨stevo_reports
      • Installation
      • Dependencies
    • 🧹stevo_communityservice
      • Installation
      • Dependencies
Powered by GitBook
On this page
  • GetName
  • GetJobCount
  • GetPlayerGroups
  • HasItem
  • RemoveItem
  • AddItem
  • RegisterUsableItem
  1. stevo lib
  2. stevo_lib
  3. Functions

Server Functions

GetName

Returns the player's characters name. Example Usage:

local name = stevo_lib.GetName(source)

print(('Player's name is:%s'):format(name))

GetJobCount

Returns the amount of players on a certain job. Example Usage:

local copCount = stevo_lib.GetJobCount(source, 'police')

print(('There are %s players on the police job'):format(copCount))

GetPlayerGroups

Returns the players job/gang roles Example Usage:

local playerJob, playerGang = stevo_lib.GetPlayerGroups(source)

if playerJob ~= 'police' then 
    DropPlayer(source, 'You are not police!')
end

HasItem

Returns the amount of an item a player has. Example Usage:

local lemonCount = stevo_lib.HasItem(source, 'lemon')

if lemonCount < 10 then 
    DropPlayer(source, 'You do not have enough lemons')
end

RemoveItem

Removes a certain amount of a certain item from a player Example Usage:

stevo_lib.RemoveItem(source, 'lemon', 10)

print('Removed 10 lemons from the player')

AddItem

Adds a certain amount of a certain item to a player. Example Usage:

stevo_lib.AddItem(source, 'lemon', 10)

print('Added 10 lemons from the player')

RegisterUsableItem

Registers a specified item as usable. Example Usage:

 stevo_lib.RegisterUsableItem('lemon', function(source)
     print('Player used their lemon')
 end)
PreviousClient FunctionsNextBusinesses

Last updated 8 months ago

📚