Modding Tools > Lucas' Simpsons Hit & Run Mod Launcher > Hacks > Mod Requirable Hacks > Custom Files > Custom Lua Functions > Path Handler Functions > UseCallbacks


This document is a work-in-progress and may be missing information.

This function should only be called in a Path Handler script.

Builds a file as the game requests it using callback functions.


UseCallbacks( <length>, <read_callback>, <close_callback>)
  • length: The filesize of the file in bytes.
  • read_callback: This callback function will get called each time the game tries to read from the file.
  • close_callback: This callback gets called when the game is done with the file.



Version History


Fixed a major issue where Lua functions that are only supposed to work when handling a path (Output, Redirect, GetPath, IsWriting and UseCallbacks) could be called in a UseCallbacks callback but would not work properly. Now they cannot be called in this case.


Added this function.

Donut Team © 2023 · v4.0