This file contains 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
--* idc if you use this in public / private script *-- | |
--* But if you use *most / all* of my code credit would be nice 💖 *-- | |
local MaxCars = 20 --Max is a HARD CAP OF 20, only make this number lower! | |
local function func_7050(string) | |
local scaleform = RequestScaleformMovie(string) | |
repeat | |
Wait(100) | |
until HasScaleformMovieLoaded(scaleform) | |
return scaleform |
This file contains 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
RegisterCommand('models', function () | |
local models = GetAllVehicleModels() | |
local missingVehicles = {} | |
for i = 1, #models do | |
if not VehicleList[models[i]] then | |
missingVehicles[#missingVehicles+1] = models[i] | |
end | |
end | |
lib.setClipboard(json.encode(missingVehicles)) | |
end) |
This file contains 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
CreateThread(function() | |
--version check with github latest version | |
PerformHttpRequest( | |
"https://raw.githubusercontent.com/[User]/[Repo]/main/fxmanifest.lua", | |
function(err, text, headers) | |
if err ~= 200 then | |
return | |
end | |
local version = GetResourceMetadata(GetCurrentResourceName(), "version") | |
local latestVersion = string.match(text, '%sversion \"(.-)\"') |
This file contains 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
//return an array of objects according to key, value, or key and value matching | |
function getObjects(obj, key, val) { | |
var objects = []; | |
for (var i in obj) { | |
if (!obj.hasOwnProperty(i)) continue; | |
if (typeof obj[i] == 'object') { | |
objects = objects.concat(getObjects(obj[i], key, val)); | |
} else | |
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
if (i == key && obj[i] == val || i == key && val == '') { // |
This file contains 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
if(process.argv.length < 3){ | |
console.log('target file path is required.') | |
process.exit(1) | |
} | |
var target = process.argv[2] | |
console.log('file: ' + target) | |
var fs = require('fs') | |
fs.readFile(target, function (err, data) { |