[Release] TruckerJob v0.3 [UPDATE 29th January]

i converted it now :wink:

The truckerjob itself works fine, but the payments didnt work. So i converted it into vRP,

Did you miss installing missiontext?

Very nice script.

But i can’t create new trailer mission, where i have done 1 mission, and from the finish destination to new destination with same truck.

i think same script from Delivery job -> [Release] GoPostal delivery job
but someone can give me code for how i can start new trailermission after finish destination, and new destination to drive from last destination ?

How do you get his money from there

Could u show how u solve problem tiwh vRP givemoney? I triel to make proxy and tunnel, but it doesnt work.

For FXServer or CFX?

CFX please. And also u can show for FXServer for future, maybe another users want to solve this problem too.

1 Like

You have to translate it from danish then.

CFX
__resource.lua

server_script "server.lua"

client_script "truckerjob.lua"

CFX
server.lua

local Tunnel = require("resources/vrp/lib/Tunnel")
local Proxy = require("resources/vrp/lib/Proxy")

vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP","vRP_truckerjob")

RegisterServerEvent('truckerJob:success') -- calls the event from client file
AddEventHandler('truckerJob:success', function(amount) -- handles the event
    local user_id = vRP.getUserId({source}) --get user id
	vRPclient.notify(source,{"Betaling ~g~"..amount.."DKK."}) -- notifies the player that they have been paid
    if vRP.giveMoney({user_id,amount}) then -- gives the money and the amount
    end
end)

FXServer
__resource.lua

dependency "vrp"

server_scripts{
	"@vrp/lib/utils.lua",
	"server.lua"
}

client_script "truckerjob.lua"

FXServer
server.lua

local Tunnel = module("vrp", "lib/Tunnel")
local Proxy = module("vrp", "lib/Proxy")
 
vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP","vRP_truckerJob")

RegisterServerEvent('truckerJob:success') -- calls the event from client file
AddEventHandler('truckerJob:success', function(amount) -- handles the event
    local user_id = vRP.getUserId({source})
	local player = vRP.getUserSource({user_id})
    vRP.giveMoney({user_id,amount})
    vRPclient.notify(player,{"Du blev betalt ~g~"..amount.."DKK."})
end)

CFX And FXServer!

in truckerjob.lua, replace or comment line 203 (by default)
MISSION.getMoney()
by
TriggerServerEvent(‘truckerJob:success’,currentMission[4])

then you are done.

  • minor update on FXServer server.lua
3 Likes

Works perfectly, thank you!

Dunwell can you help me

im not sure, but i can try.

Can you help and install it for trucks

Hm, download and follow instructions. If u need reward like money use this post [Release] TruckerJob v0.3 [UPDATE 29th January]

I can not find out of that money

just replace 203 line in truckerjob.lua

MISSION.getMoney()

by

TriggerServerEvent(‘truckerJob:success’,currentMission[4])

and follow instruction in message before. I dont know FXserver or CFX u using.

I am using fxserver Do you want to help me can not

So use instruction from link above for FXServer, and i think it will work. Cause i use CFX and it works.

Yes, but I do not know where to throw text

Does this mod not work with the new update? for some reason I can get the menu but no truck spawns

can someone tell me where cit-mp is loactated as i can not find it
Discord is JordayGaming#0979 if you can tell me pm me or send another comment