milotiro95 / xnlrankbar Goto Github PK
View Code? Open in Web Editor NEWMy XP system open source for QBCore
My XP system open source for QBCore
Hello,
Nice script you have here.
I got some issue when im trying to implement the check xp on a script i have.
Error img:
https://imgur.com/a/ZPqbHsk
The resource code:
`
RegisterNetEvent('qbdriftmode:DriftMode', function()
ped = PlayerPedId()
local ped = PlayerPedId()
local xp = exports.XNLRankBar:Exp_XNL_GetCurrentPlayerXP()
local vehicle = GetVehiclePedIsUsing(ped)
if xp <= 6100 then
QBCore.Functions.Notify("โ You need to be level 5..", "error")
end
if GetVehicleHandlingFloat(vehicle, "CHandlingData", "fInitialDragCoeff") < 90 then
SetVehicleEnginePowerMultiplier(vehicle, 0.0)
else
if GetVehicleHandlingFloat(vehicle, "CHandlingData", "fDriveBiasFront") == 0.0 then
SetVehicleEnginePowerMultiplier(vehicle, 190.0)
else
SetVehicleEnginePowerMultiplier(vehicle, 100.0)
end
end
if (GetPedInVehicleSeat(vehicle, -1) == ped) then
if GetVehicleHandlingFloat(vehicle, "CHandlingData", "fDriveBiasFront") ~= 1 and IsVehicleOnAllWheels(vehicle) and IsVehicleClassWhitelisted(GetVehicleClass(vehicle)) then
local modifier = 1
if GetVehicleHandlingFloat(vehicle, "CHandlingData", "fInitialDragCoeff") > 90 then
driftMode = true
else
driftMode = false
end
if driftMode then
modifier = -1
end
for index, value in ipairs(handleMods) do
SetVehicleHandlingFloat(vehicle, "CHandlingData", value[1], GetVehicleHandlingFloat(vehicle, "CHandlingData", value[1]) + value[2] * modifier)
end
if driftMode then
QBCore.Functions.Notify("Drift mode | Off")
else
QBCore.Functions.Notify("Drift mode | ON!")
end
end
if GetVehicleHandlingFloat(vehicle, "CHandlingData", "fInitialDragCoeff") < 90 then
SetVehicleEnginePowerMultiplier(vehicle, 0.0)
else
if GetVehicleHandlingFloat(vehicle, "CHandlingData", "fDriveBiasFront") == 0.0 then
SetVehicleEnginePowerMultiplier(vehicle, 190.0)
else
SetVehicleEnginePowerMultiplier(vehicle, 100.0)
end
end
end
end)`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.