mascotte-scripts / cache

A FiveM native cache that reduces the number of native calls from the client!
https://forum.cfx.re/t/wip-native-cache/2827109
Creative Commons Zero v1.0 Universal
5 stars 6 forks source link

Improvements #2

Closed NotSomething0 closed 3 years ago

NotSomething0 commented 3 years ago

1: Removed common.lua we now use an export with an anonymous function that returns the entire cache table. 2: Don't propagate Cache table to global env as it isn't necessary 3: Better way to retrieve cache values

-- This will return the player local ped
exports.cache:requestCache().PlayerPed

4: Removed value "Cache.GetPlayerPed" it returns the same value as PlayerPedId() but is slower 5: This resource will only work with gta5 not rdr3

NotSomething0 commented 3 years ago

Also you'll want to rename this repo having a - will give "attempt to index a nil value (global 'cache')"

mascotte-scripts commented 3 years ago

Merged. Much appreciated ron!