update fix most of the script

This commit is contained in:
Mustache Dom committed 2025-01-28 20:15:32 -08:00
1 parent 36131995d4
commit f06778c345
12 files changed
+287 -303

No files matched your search

+20 -2
View File
@@ -64,8 +64,8 @@ function progressbar(text, time, anim)
until cancelled or test
if test then return true end
else
print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
end
print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
end
end
function loadParticle(dict)
@@ -655,6 +655,24 @@ function StartRay2()
until run == false
end
function getAmbo()
if Config.Framework == 'qb' then
local Player = QBCore.Functions.GetPlayerData()
if Player.PlayerData.job.type == 'ems' then
return true
else
return false
end
elseif Config.Framework == 'esx' then
local Player = ESX.GetPlayerData()
if Player.job.name == 'ambulance' then
return true
else
return false
end
end
end
CreateThread(function()
LoadModel('prop_plant_01b')
LoadModel('prop_plant_01a')
+1 -1
View File
@@ -1,13 +1,13 @@
local carryPackage = nil
RegisterNetEvent("md-drugs:client:GetOxyCar", function()
print("oxy")
lib.requestModel("burrito3", Config.RequestModelTime)
local paid = lib.callback.await('md-drugs:server:payfortruck', false)
if not paid then return end
local loca = lib.callback.await('md-drugs:server:getLocs', false)
local loc = loca.singleSpot.truckspawn
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
Notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute")
+2 -1
View File
@@ -1,6 +1,6 @@
lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
if getJobType() ~= 'ems' then return end
if not getAmbo() then return end
local input = lib.inputDialog('Who To Give A Prescription To?',{
{type = 'select', label = 'Player Name', options = data},
{type = 'select', label = 'Prescription', options = op}})
@@ -18,3 +18,4 @@ lib.callback.register("md-drugs:client:unbottle", function()
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
return true
end)