Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cookies = {}
- function cookies.Set(key, value)
- luadata.SetKeyValueInFile("cookies.txt", key, value)
- cookies.current[key] = value
- end
- function cookies.Get(key, def)
- if not cookies.current then cookies.Reload() end
- return cookies.current[key] or def
- end
- function cookies.Reload()
- cookies.current = luadata.ReadFile("cookies.txt")
- end
Advertisement
Add Comment
Please, Sign In to add comment