Sim Posted August 14, 2021 Posted August 14, 2021 new Hook("moduleLoad", function ($moduleToLoad) { global $user; if($user) { if($user->info->US_activeHeros == 0) return "hero"; } return $moduleToLoad; }); So, I do not want a player to access any part of the game without having a hero first, so this is the start for anyone. I still must add the if statements to not redirect if on pages such as login, register. Almost the same concept as jailed player. Quote
Dayo Posted August 15, 2021 Posted August 15, 2021 Yes i keep meaning to move the jail/hospital away from their current setup to use this hook, its really powerful 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.