SphereCommunity
Force Logout? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Force Logout? (/Thread-Force-Logout)

Pages: 1 2


RE: Force Logout? - x77x - 10-03-2016 06:07 AM

doesnt work for me...
same as always

"your are not privileged to do that!"
or
16:15:ERROR:(3kuo_i_JOINARMY_PLAYERS.scp,9)Undefined keyword 'disconnect'


[FUNCTION goodbye]
timerf 5,fgoodbye

[FUNCTION fgoodbye]
trigger @logout
disconnect// or src.disconnect


[FUNCTION JOINWEI]
SRC.SYSMESSAGE @0033 Saving your information...
SRC.SYSMESSAGE @0033 You will be disconnected in 10 seconds, Please log back in!
GOODBYE//or SRC.GOODBYE

i dont think you can use disconnect via script on a player
and anyone thats says it does probably has an older version of sphere


RE: Force Logout? - darksun84 - 10-03-2016 07:05 PM

If you have privilege problems, use: trysrv

[PLEVEL 1]
testDisconnect

[function testDisconnect]
trysrv disconnect
return


RE: Force Logout? - x77x - 10-03-2016 09:13 PM

thank you darksun84, you solved the riddle =)

Code:
[PLEVEL 1]
GOODBYE

[function GOODBYE]
trysrv disconnect
return

SRC.SYSMESSAGE @0033 Saving your information...
SRC.SYSMESSAGE @0033 You will be disconnected in 10 seconds, Please log back in!
SRC.TIMERF 5, GOODBYE