Search the Community
Showing results for tags 'runcode'.
-
Version 2.0
1286 downloads
This script allows developers to run and test their code while in game using their favorite code editor. Preview: https://streamable.com/3fz1ck Features: Executes the code once you save the file Auto destroys the old entities created by hotloader to prevent duplicated entities created and improve rapid developing. Auto destroy old event listeners created by hotloader (`let myEvent = new mp.Event('render', ()=> {})`) , read below. Runs code server-side (hotloader/server/*) Runs code client-side (hotloader/client/*) Note this is not meant to be used in in production. How to use: Drag all the folders into server root (place the packages folder into your server/packages, and the hotloader folder in the server root) in root/hotloader you can do your testing in client.js or server.js or you can create new files in the same directory. You have to save the file to apply the chagnes. Auto entity/event remover is activated only when you declare entities with let/var in the main scope (not in if statements or functions) For events dont use mp.events.add, rather use `let myEvent = new mp.Event('eventName', function)` so hotloader can kill the event listener