From 61ef9cf59b5c8ecf81b128ec59e11d2e7aee76b5 Mon Sep 17 00:00:00 2001 From: radmanplays <95340057+radmanplays@users.noreply.github.com> Date: Sat, 17 Feb 2024 11:22:12 +0330 Subject: [PATCH] Add files via upload --- docs/example.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/example.js diff --git a/docs/example.js b/docs/example.js new file mode 100644 index 0000000..d350ba7 --- /dev/null +++ b/docs/example.js @@ -0,0 +1,7 @@ +function runCode() { + if (document.pointerLockElement != null){//if pointerlock is enabled (the player is in game) + ModAPI.displayToChat({msg: "hello"}) + ModAPI.displayToChat({msg: "welcome to eaglerforge!"}) + } +} +var intervalId = setInterval(runCode, 50);//run the code in a loop \ No newline at end of file