Police Check
This is where a players job is checked and returns true if they have a configured police job, returns false otherwise
-- Purpose: Check if player is police officer
-- return [bool]: Whether the player is a police officer
function IsPolice()
return false
end
Ownership
This will check if a player owns the motorhome or has keys.
-- Purpose: Function to check if the player has ownership of a vehicle.
-- vehicle [int]: Vehicle entity
-- return [bool]: Whether the player has ownership of the vehicle
function HasOwnership(vehicle)
--QBcore Vehicle Keys
--local Promise = promise.new()
--Framework.Functions.TriggerCallback('qb-vehiclekeys:server:checkPlayerOwned', function(playerOwned)
-- Promise:resolve(playerOwned)
--end, Framework.Functions.GetPlate(vehicle))
--local result = Citizen.Await(Promise)
--return result
--Quasar Vehicle Keys
--local result = exports['qs-vehiclekeys']:GetKey(GetVehicleNumberPlateText(vehicle))
--return result
return true
end
Stash / Inventory
Configure an inventory system that works best for you. Triggered when someone interacts with the stash location
-- Purpose: Function to open inventory.
-- vehicle [int]: Vehicle entity
function OpenInventory(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
--QB Inventory or PS Inventory
---------------------------------------------------------------------------------------------
--TriggerServerEvent('inventory:server:OpenInventory', 'stash', 'Mobile_' .. plate, {
-- maxweight = 500000,
-- slots = 60
--})
--TriggerEvent('inventory:client:SetCurrentStash', 'Mobile_' .. plate)
---------------------------------------------------------------------------------------------
--Quasar Inventory
---------------------------------------------------------------------------------------------
--TriggerServerEvent('inventory:server:OpenInventory', 'stash', 'Mobile_' .. plate)
--TriggerEvent('inventory:client:SetCurrentStash', 'Mobile_' .. plate)
---------------------------------------------------------------------------------------------
--ox_inventory
---------------------------------------------------------------------------------------------
--if not exports.ox_inventory:openInventory('stash', 'Mobile_' .. plate) then
-- TriggerServerEvent('gs-motorhomes:server:registerOx_Inventory', plate, 'Mobile ' .. plate, 500000, 60)
-- Wait(2000)
--end
--exports.ox_inventory:openInventory('stash', 'Mobile_' .. plate)
---------------------------------------------------------------------------------------------
--core_inventory
---------------------------------------------------------------------------------------------
--TriggerServerEvent('core_inventory:server:openInventory', 'Mobile_' .. plate, 'stash')
---------------------------------------------------------------------------------------------
--cheeza_inventory
---------------------------------------------------------------------------------------------
--TriggerEvent('inventory:openHouse', 'HouseStash', 'Mobile_' .. plate, 'House', 500000)
---------------------------------------------------------------------------------------------
end
Clothes / Wardrobe
Configure an clothing system that works best for you. Triggered when someone interacts with the wardrobe location
function OpenClothes()
--QB Clothing
---------------------------------------------------------------------------------------------
--TriggerEvent('qb-clothing:client:openOutfitMenu')
---------------------------------------------------------------------------------------------
--rCore Clothing
---------------------------------------------------------------------------------------------
--TriggerEvent("rcore_clothes:openOutfits")
---------------------------------------------------------------------------------------------
--Raid Clothes
---------------------------------------------------------------------------------------------
--TriggerEvent('raid_clothes:openmenu')
---------------------------------------------------------------------------------------------
-- Illenium Appearence
---------------------------------------------------------------------------------------------
--TriggerEvent("illenium-appearance:client:openOutfitMenu")
---------------------------------------------------------------------------------------------
--AK47 Clothing
---------------------------------------------------------------------------------------------
--local resp, _ = pcall(function() exports['ak47_clothing']:openOutfit() end)
--if not resp then
-- TriggerEvent('ak47_clothing:openOutfitMenu')
--end
---------------------------------------------------------------------------------------------
--FiveM Appearence
---------------------------------------------------------------------------------------------
--exports['fivem-appearance']:startPlayerCustomization(function(success) end, {ped = true, headBlend = true, faceFeatures = true, headOverlays = true, components = true, props = true, allowExit = true, tattoos = true})
---------------------------------------------------------------------------------------------
end
Last updated