• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua [TFS 0.3.6] Logout on exit.

waqmaz

Member
Joined
Jun 17, 2015
Messages
203
Reaction score
11
Is there any way to logout a player when he clicks exit?
I have tried to check the player's IP onLogin and onLogout like:
Code:
print('getPlayerIp(cid): '..getPlayerIp(cid))
but the IP after clicking "exit" doesn't change to zero, so I cannot check if a player has IP zero, then logout him.
Is it possible without C++?
There is not also anything like "logout on exit" in config.lua.
Thanks.
 
Mhmm, you shouldn't do it, this would ruin the game experience.

In your server sources there is a function that checks if the character is pzlocked / battled before logging out, just comment out that line! ;)
 
Do you have a logoutscript? or onlogout? you could ignore the pzlock / battle adding stuff in there, I'm no scripter but there are a few really good here, maybe they've got better ideas :)
 
Back
Top