Faller 93 Report post Posted November 22, 2017 Hey there! I'd like to know if there's any functions in TOP's library that allows us to do something when a player has logged in or logged off? I have an idea to check when the player logs in (through that function in the maps that notices the open mazes), but is there any other way? The objective with this is release memory used by the player when he logs off, and address memory/cache a few stuff when he logs on (for variables with role). That's it! I'd be very thankful if you can help me out. 1 Quote Share this post Link to post Share on other sites
DangThao 81 Report post Posted November 22, 2017 I would like to know too, cause seems like there is one but idk where to find. Such as the one that when player logout and login, it will display the helpinfo file. 1 Quote Share this post Link to post Share on other sites
Syntax 28 Report post Posted November 22, 2017 The only way can be done using lua is from: -Logged Out -> before_leave_map(role) -Logged In -> after_enter_map(role,map_copy) but those function is also called every time player teleporting 1 Quote Share this post Link to post Share on other sites
Faller 93 Report post Posted November 22, 2017 (edited) 1 hour ago, Syntax said: The only way can be done using lua is from: -Logged Out -> before_leave_map(role) -Logged In -> after_enter_map(role,map_copy) but those function is also called every time player teleporting Hey! Thanks for shouting out. I didn't think of these, but I was using after_player_login_ to check when the player logs in, but it's kinda messy, sometimes doesn't work, sometimes it triggers with no reason, etc... I gotta better test it hehehe I've been thinking of workarounds to use in these scripts, but I still haven't gotten into any conclusions.. I hate how the original scripts from TOP use memory, it's such a waste. Even though it's a very small quantity, when you've got a lot of "small quantities", you get something big. That's why I deleted at least 80% of the scripts and reworked the rest LOL Edited November 23, 2017 by Faller Quote Share this post Link to post Share on other sites