mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +01:00
tweak(resource/cache): playerId, serverId, and micro
This commit is contained in:
7
resource/cache/client.lua
vendored
7
resource/cache/client.lua
vendored
@@ -1,6 +1,11 @@
|
|||||||
local cache = {}
|
local cache = {}
|
||||||
|
cache.playerId = PlayerId()
|
||||||
|
cache.serverId = GetPlayerServerId(cache.playerId)
|
||||||
|
|
||||||
|
local GetVehiclePedIsIn = GetVehiclePedIsIn
|
||||||
local GetPedInVehicleSeat = GetPedInVehicleSeat
|
local GetPedInVehicleSeat = GetPedInVehicleSeat
|
||||||
|
local GetVehicleMaxNumberOfPassengers = GetVehicleMaxNumberOfPassengers
|
||||||
|
|
||||||
function cache:getVehicle()
|
function cache:getVehicle()
|
||||||
local vehicle = GetVehiclePedIsIn(self.ped, false)
|
local vehicle = GetVehiclePedIsIn(self.ped, false)
|
||||||
if vehicle > 0 then
|
if vehicle > 0 then
|
||||||
@@ -43,6 +48,8 @@ function cache:set(key, value)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local GetEntityCoords = GetEntityCoords
|
||||||
|
|
||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
local num = 1
|
local num = 1
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
Reference in New Issue
Block a user