update readme export info

This commit is contained in:
Jim Shield
2024-01-17 20:23:54 +00:00
committed by GitHub
parent 508c4a734a
commit d693a99852
2 changed files with 40 additions and 4 deletions

View File

@@ -23,4 +23,25 @@ But I want this script to grow with help of others who know more about other cor
The installation of this script is simple
- it just needs to start before any script that requires it
- it can start before core scripts if you want
- for `qb-core` I personally place this script in `resources > [standalone]`
- for `qb-core` I personally place this script in `resources > [standalone]`
---
### Support for different exports and scripts
In exports.lua is the list of script folder names
This is for people who have customised/renamed scripts
eg. for people who use `ps-inventory`, this is mainly based on qb-inventory
so you need to rename
```lua
QBInv = "qb-inventory",
```
to
```lua
QBInv = "ps-inventory",
```
This will now use events from `ps-inventory` and use it through out the scripts.

View File

@@ -95,11 +95,26 @@ function makeProp(data, freeze, synced)
end
function cv(amount)
local formatted = amount
local formatted = amount or "0"
while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if (k==0) then break end Wait(0) end
return formatted
end
function DrawText3D(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(true)
SetTextColour(255, 255, 255, 215)
BeginTextCommandDisplayText("STRING")
SetTextCentre(true)
AddTextComponentSubstringPlayerName(text)
SetDrawOrigin(x,y,z, 0)
EndTextCommandDisplayText(0.0, 0.0)
local factor = string.len(text) / 370
DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
AddEventHandler('onResourceStop', function(r)
if r ~= GetCurrentResourceName() then return end
stopSpinner()
@@ -287,7 +302,7 @@ function progressBar(data)
lockInv(false)
if data.cam then stopTempCam(data.cam) end
end
elseif Config.System.ProgressBar == "qb" then
Core.Functions.Progressbar("mechbar",
data.label,
@@ -818,4 +833,4 @@ function StopEffects() -- Used to clear up any effects stuck on screen
AnimpostfxStop('RaceTurbo')
AnimpostfxStop('FocusIn')
AnimpostfxStop('Rampage')
end
end