mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
restructure ox_lib docs
This commit is contained in:
1 parent
8081132d6f
commit
a8be760943
21 files changed
+5
-30
No files matched your search
@@ -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)
|
||||
```
|
||||
Reference in new issue
Block a user