Wise Scripts Docs
ShopDiscord
  • 👋Welcome
  • 💻 Scripts
    • 🚙Wise Garage
      • Installation
      • Database
      • Events
      • Example Configs
        • Main
        • Garages
        • Impounds
    • 🖥️Wise Hud
      • Installation
      • Example Configs
        • Main
    • 🦌Wise Hunting
      • Installation
      • Example Configs
        • Main
        • Animals
        • Huntareas
        • Market
    • 🔫Wise Gungame
      • Installation
      • Setup for Ambulancejob
    • 👥Wise Faction
      • Installation
      • Exports
      • Events
      • Setup FFA & Gangwar
      • Example Configs
        • Main
        • FFA
        • Gangwar
        • Robbery
        • Shop
        • Missions
    • 🔔Wise Notify
      • Installation
      • Exports & Triggers
      • ESX Replacements
    • ⚠️Wise Report
      • Installation
    • 🎮Wise Lifeinvader
      • Installation
  • 🏡PROPS
    • 🪨Wise Ore Props Pack
    • ✨Wise Crystal Props Pack
  • 🧟‍♂️PEDS
    • 🎃HALLOWEEN Pumpkin Monster
    • 🎃HALLOWEEN MR Bright
Powered by GitBook
On this page
  1. 💻 Scripts
  2. Wise Faction

Events

Park out faction Vehicle

AddEventHandler("wise_faction:garage:parkOut", function (plate)
  -- Example for giving Vehicle Keys to player 
  TriggerEvent("vehiclekeys:client:SetOwner", plate)
end)

Added Member to Faction

AddEventHandler("wise_faction:faction:memberAdded", function(factionName, playerId)
    -- Example for updating ESX xPlayer Job
    local xPlayer = ESX.GetPlayerFromId(playerId)
    if not xPlayer then 
        print("ERROR: Player not found")
        return 
    end    

    xPlayer.setJob(factionName, 1)
end)

Removed Member from Faction

AddEventHandler("wise_faction:faction:memberRemoved", function(factionName, playerId)
    -- Example for updating ESX xPlayer Job
    local xPlayer = ESX.GetPlayerFromId(playerId)
    if not xPlayer then 
        print("ERROR: Player not found")
        return 
    end
    
    xPlayer.setJob("unemployed", 0)
end)
PreviousExportsNextSetup FFA & Gangwar

Last updated 1 year ago

👥