restructure ox_lib docs

This commit is contained in:
Linden committed 2022-05-12 18:07:54 +10:00
1 parent 8081132d6f
commit a8be760943
21 files changed
+5 -30

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
Caches data related to the player and handling some events or statebags.
An interval runs every 100ms to update data that cannot be checked via handlers.
https://github.com/overextended/ox_lib/blob/master/resource/cache/client.lua
## States
```lua
cache.ped -- player entity id
cache.vehicle -- vehicle entity id
cache.seat -- vehicle seat index
```
## lib.onCache
Register a callback function when the value is changed.
```lua
lib.onCache('vehicle', function(value)
print('vehicle', value)
end)
lib.onCache('seat', function(value)
print('seat', value)
end)
```