Enhance cache module with improved type annotations and error handling; allow nil wait times for dynamic caching
This commit is contained in:
1 parent
68aa645494
commit
3ea66043ea
2 files changed
+92
-39
No files matched your search
Vendored
+5
-5
@@ -54,10 +54,10 @@ local function GetWeapon()
|
||||
return GetSelectedPedWeapon(ped)
|
||||
end
|
||||
|
||||
Cache.Create("Ped", GetPed, 1000) -- Check ped every second (adjust as needed)
|
||||
Cache.Create("Vehicle", GetVehicle, 500) -- Check vehicle every 500ms
|
||||
Cache.Create("Seat", GetVehicleSeat, 500) -- Check if in vehicle every 500ms
|
||||
Cache.Create("Weapon", GetWeapon, 250) -- Check weapon every 250ms
|
||||
Cache.Create("ServerId", GetServerId, 1000) -- Check server ID every second
|
||||
Cache.Create("Ped", GetPed, nil) -- Check ped every second (adjust as needed)
|
||||
Cache.Create("Vehicle", GetVehicle, 500) -- Check vehicle every 500ms
|
||||
Cache.Create("Seat", GetVehicleSeat, 500) -- Check if in vehicle every 500ms
|
||||
Cache.Create("Weapon", GetWeapon, 250) -- Check weapon every 250ms
|
||||
Cache.Create("ServerId", GetServerId, nil) -- Check server ID every second
|
||||
|
||||
return Cache
|
||||
Reference in new issue
Block a user