Jump to content
Faller

Player Logout/Login Check

Recommended Posts

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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 :sad:

  • Like 1

Share this post


Link to post
Share on other sites
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 :sad:

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 by Faller

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...