⚔ïļExport and Events

Mission system

First of all, we need to know that we will use this event frkn-craftv2:givexp.So how will we use it? Let's say we want it to give us xp when a profession is over.This is an example of giving xp when you fill up gasoline in the frkn-fuelstation script.This is a complete example, add it where you want.As you can see at the bottom, I used the event after the process is over. Instead of the number there, you write how many xp you want it to give. Write multiples of 20 as xp, such as 20,40,60, etc. If you write something else, the system will break.

RegisterNetEvent("frkn-fuelstation:server:PayForFuel", function(amount)
    local src = source
    if not src then return end
    local player = QBCore.Functions.GetPlayer(src)
    if not player then return end
    player.Functions.RemoveMoney('bank', amount)
    TriggerServerEvent('frkn-craftv2:givexp',20) --Here it gives the player 20xp after the process is finished. You can put this in your own scripts.This is just an example
end)

Last updated