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
function LoadAnimationDictionary(animationD) | |
RequestAnimDict(animationD) | |
while not HasAnimDictLoaded(animationD) do | |
Citizen.Wait(1) | |
end | |
end | |
function RequestTextureDictionary (dict) | |
RequestStreamedTextureDict(dict) |
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 setGear = GetHashKey('SET_VEHICLE_CURRENT_GEAR') & 0xFFFFFFFF | |
local function SetVehicleCurrentGear(veh, gear) | |
Citizen.InvokeNative(setGear, veh, gear) | |
end | |
local nextGear = GetHashKey('SET_VEHICLE_NEXT_GEAR') & 0xFFFFFFFF | |
local function SetVehicleNextGear(veh, gear) | |
Citizen.InvokeNative(nextGear, veh, gear) | |
end |
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 LoadScaleform(scaleform) | |
local scaleform = RequestScaleformMovie(scaleform) | |
if scaleform ~= 0 then | |
while not HasScaleformMovieLoaded(scaleform) do | |
Citizen.Wait(0) | |
end | |
end | |
return scaleform | |
end |
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 CreateNamedRenderTargetForModel(name, model) | |
local handle = 0 | |
if not IsNamedRendertargetRegistered(name) then | |
RegisterNamedRendertarget(name, 0) | |
end | |
if not IsNamedRendertargetLinked(model) then | |
LinkNamedRendertarget(model) | |
end | |
if IsNamedRendertargetRegistered(name) then | |
handle = GetNamedRendertargetRenderId(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
Citizen.CreateThread(function () | |
local context = GetHashKey("MINI_PROSTITUTE_LOW_RESTRICTED_PASSENGER") | |
while true do | |
ped = PlayerPedId() | |
vehicle = GetVehiclePedIsIn(ped, false) | |
-- Ped is in vehicle | |
if DoesEntityExist(vehicle) then | |
local engine = GetIsVehicleEngineRunning(vehicle) |
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
function LoadModel (model) | |
if not IsModelInCdimage(model) then return end | |
RequestModel(model) | |
while not HasModelLoaded(model) do Citizen.Wait(0) end | |
return model | |
end |
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 weapons = {} | |
function headsUp(text) | |
SetTextComponentFormat('STRING') | |
AddTextComponentString(text) | |
DisplayHelpTextFromStringLabel(0, 0, 1, -1) | |
end | |
function RestoreAmmoForWeapon (weapons, weapon, waitTime) | |
local playerPed = PlayerPedId() |