jibibi
February 18, 2024, 2:08pm
1
JBB-VTCJOB : Become an UverX driver
I everyone, this is my first ressource shared with the community.
I wanted to make an simple script to allow players to be an UverX driver but also to be able to request the app for a ride which will be sent to driver on duty.
I made this script just for fun, I don’t own a server to test it, so all the tests were done on my local server with my 2 game clients launched.
Here are 2 videos (no editing, sorry) to show both cases :
NPC ride demo
Player ride demo
Feel free to open issues on github if you find some, i’ll probably add some more features in the future.
resmon
While not using :
While driver is on NPC drive :
When new course arrive or distance are recalculated :
Customer when asking for a ride :
Driver (on top) and customer (bottom) while on a customer ride :
Screen captures
The menu when on duty as a driver
The customer requirements when NPC entered the vehicle
The current drive in progress for the Driver
A
B
Download
Github
Framework
QB/ESX
Code is accessible
Yes
Subscription-based
No
Lines (approximately)
2000
Support
No
14 Likes
This looks cool! I will test it out in my server
Whats the resmon like?
jibibi
February 18, 2024, 4:15pm
3
While not using :
While driver is on NPC drive :
When new course arrive or distance are recalculated :
Customer when asking for a ride :
Driver (on top) and customer (bottom) while on a customer ride :
I’ll push an update soon (in like 1 or 2 hours) with the feature making it possible for a player to rate his driver after the drive.
1 Like
muzorm
February 18, 2024, 7:25pm
4
sql file cannot be read, it gives many errors, I would appreciate it if you could edit it
1 Like
jibibi
February 18, 2024, 7:38pm
5
What kind of error did you had ?
I’ve run the script on a fresh database and had no problems.
Waht Database are you using and which version ?
EDIT: Wrong file indeed on github, i’ll push the good one.
muzorm
February 18, 2024, 8:02pm
6
I get this error when I switch to driving mode
1 Like
jibibi
February 18, 2024, 8:12pm
7
Sorry for the inconvenience
I forgot to change a variable in my last commit. It should be good now.
The diff is here : Commit 3954cd89
jibibi
February 18, 2024, 8:17pm
9
Thanks, I appreciate it
Feel free to give any ideas.
jibibi
February 19, 2024, 11:14am
11
I’m not familiar with esx framework, but i’ll put it in the backlog
2 Likes
jibibi
February 20, 2024, 12:03am
12
I’ve started to make the ESX version.
I’m on a fresh installed ESX without any third-party scripts installed for money/items/inventory …
I’ve tested NPC drive and Driver at the moment and it seems to work.
I need to go deeper in tests before releasing this version to be sure nothing has been broke QBCore side and to tests parameters like required job/items …
You can get the code from the branch feature/esx_compatibility
1 Like
jibibi
February 20, 2024, 8:48pm
13
NEW VERSION
Hi everyone.
The release 1.1.0 is here.
This one contains ESX compatibility and the release is directly available here : Release v1.1.0
I’m adding some new pages to the wiki to help you tweak the confs
See ya !
1 Like
jibibi
February 23, 2024, 7:47pm
15
Can you give more details.
I have no problem running it on my local server, do you use anything particular on your server ?
jibibi
February 23, 2024, 8:19pm
17
Okay that’s why you have the error. You can adapt the code to support you custom notification system.
return QBCore.Functions.GetPlayer(source)
else
return false
end
end
function Jbb.Notify(source, message, genre, time)
if Jbb.isESX then
TriggerClientEvent("esx:showNotification", source, message, genre, time)
elseif Jbb.isQB then
QBCore.Functions.Notify(source, message, genre, time)
else
return false
end
end
function Jbb.HasItem(source, item, count)
if Jbb.isESX then
local xPlayer = ESX.GetPlayerFromId(source)
local item = xPlayer.hasItem(item)
return item and item.count >= count
On line 60 you can change the call to you’re notification ressource.
Can you give me a link to the ressource you use for notification to see if i can make a better solution to support other notification ressources.
jibibi:
function Jbb.Notify(source, message, genre, time)
if Jbb.isESX then
TriggerClientEvent("esx:showNotification", source, message, genre, time)
elseif Jbb.isQB then
QBCore.Functions.Notify(source, message, genre, time)
else
return false
end
end
error in line : 60 QBCore.Functions.Notify(source, message, genre, time)
Can i deactivated the NPC Drives and only use it for Players ?
jibibi
February 25, 2024, 9:51pm
20
I just pushed an update on branch main, not tested but should be good.
The new conf is : Config.VTC.general.npc_drives_enabled = true/false
1 Like