Skip to content

Commit 61ef9cf

Browse files
authored
Add files via upload
1 parent 3a11b1a commit 61ef9cf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/example.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function runCode() {
2+
if (document.pointerLockElement != null){//if pointerlock is enabled (the player is in game)
3+
ModAPI.displayToChat({msg: "hello"})
4+
ModAPI.displayToChat({msg: "welcome to eaglerforge!"})
5+
}
6+
}
7+
var intervalId = setInterval(runCode, 50);//run the code in a loop

0 commit comments

Comments
 (0)