The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a player disconnect?
Author Message
Capes
Journeyman
*

Posts: 57
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Mar 2018
Reputation: 0



Post: #7
RE: How to make a player disconnect?
All these produce the same priv errors;
[PLEVEL 7]
f_func_to_dissconnect <- code to disconnect inside

tryp 0,1,3,4,5,6 or 7 src.disconnect
trysrv src.disconnect
serv.uid.<src.uid>.disconnect

None of the above allows a disconnect call (all produce same priv error).

I have found a work around though;

Make a custom event handler to handle to logout manually. Like below-
In my case player presses a button in a gump where I did this
src.events +e_logout_handler

[EVENTS e_logout_handler]
ON=@LOGOUT
//make sure it's ok to log out instantly under certain conditions
if (*conditions exist*)
//allow instant logout
argn2=1 //<--- this means instant logout no linger
//remove handler from player
src.events -e_logout_handler
endif

Thanks
Capes
03-30-2018 04:27 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
How to make a player disconnect? - Capes - 03-22-2018, 01:19 AM
RE: How to make a player disconnect? - Capes - 03-30-2018 04:27 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)