You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you need to listen for specific key changes across entities in a resource you can use crc.events.onKeyChange.
This means that when the data is written to the database; it will call any callbacks assigned to the function.
Example
crc.events.onKeyChange('cash',(player: alt.Entity,newCash: number,oldCash: number|undefined)=>{if(!(playerinstanceofalt.Player)){return;}alt.log(`Player Cash changed from ${oldCash} to ${newCash});});