This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function logMessage(_type, message) | |
local color = _type == 'success' and '^2' or '^1' | |
print(('^8[GD3V]%s %s^7'):format(color, message)) | |
end | |
local function checkMenuVersion() | |
PerformHttpRequest('https://raw.githubusercontent.com/MrGrootx/g-updates/master/g-ownable-job-vehicle.txt', | |
function(err, text, headers) | |
if err ~= 200 then | |
logMessage('error', 'Unable to run a version check. Error: ' .. err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local plate = "G-".. QBCore.Shared.RandomInt(1) .. QBCore.Shared.RandomStr(2) .. QBCore.Shared.RandomInt(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const name = | |
product.name.length > 21 | |
? product.name.substring(0, 20) + ".." | |
: product.name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local remainingsec = 0 | |
function disp_time(time) | |
local minutes = math.floor((time % 3600 / 60)) | |
local seconds = math.floor((time % 60)) | |
return string.format("%02dm %02ds", minutes, seconds) | |
end | |
-- startTimer() | |
function startTimer() | |
Citizen.CreateThread(function() | |
Citizen.CreateThread(function() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { id } = req.params; | |
if (!mongoose.Types.ObjectId.isValid(id)) { | |
return res.status(404).json({ msg: "Task not found" }); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Citizen.CreateThread(function() | |
while true do | |
local coords = Config.vehicleSpawn.MarkerPos | |
local pedCoords = GetEntityCoords(PlayerPedId()) | |
if ESX.PlayerData.job and ESX.PlayerData.job.name then | |
if ESX.GetPlayerData().job and ESX.GetPlayerData().job.name then | |
if ESX.GetPlayerData().job.name == "police" then | |
DrawMarker(21, coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 1.0, 1.0, 1.0, 0, 255, 20, | |
50, false, true, 2, false, nil, nil, false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
email: z | |
.string() | |
.email({ | |
message: "Enter a valid email address", | |
required_error: "email requried", | |
}) | |
.trim() | |
.toLowerCase(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkbox : z.boolean().refine((v) => v === true, { | |
message: "checkbox message here", | |
}), |