Scripting - Local to Global

Feb 22, 2026
1
0
50
15
Brazil
Pronouns
He
First of all, im new to scripting. Especially making Mario 64 mods and i edited this post just to be more "understandable".
Hello, i have a question, how can i make things like functions, hooks and other things like that, affecting to all people in the server?

For example:

---@param m MarioState
function mario_update(m)
if (m.controller.buttonPressed & L_TRIG) ~= 0 then
warp_to_level(16,1,1)
end
end
hook_event(HOOK_MARIO_UPDATE,mario_update)
Here we can see that, if i press L, I will warp to a level of number 16 (castle grounds if i remember well), BUT, only the LOCAL PLAYER (who pressed L) will warp.
And my question is, how i make that work on ALL PLAYERS in the server?
Thank you.
 
Last edited:

Users who are viewing this thread