SphereCommunity
Stop timer if user logout and continue if is online - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Stop timer if user logout and continue if is online (/Thread-Stop-timer-if-user-logout-and-continue-if-is-online)



Stop timer if user logout and continue if is online - Criminal - 09-30-2015 04:48 PM

well, I check and if i equip a memory to a player and set a timer, it will count if is online or logout, i want limit it only if user is online, is there any way?
or delete the mem and set a tag on logout with timer left


RE: Stop timer if user logout and continue if is online - evening - 09-30-2015 04:54 PM

if (<src.isonline>)
sysmessage online
else
sysmessage offline
endif


RE: Stop timer if user logout and continue if is online - pointhz - 09-30-2015 05:51 PM

Add logout/login checks to restore it


RE: Stop timer if user logout and continue if is online - Kanibal - 10-05-2015 08:43 PM

You need an event related to this player like this:
Code:
[EVENTS e_my_event]
ON=@Login
src.findlayer(30).findid(my_memory).timer=<src.tag.mytimer>

ON=@LogOut
src.tag.mytimer=<src.findlayer(30).findid(my_memory).timer>
src.findlayer(30).findid(my_memory).timer=-1



RE: Stop timer if user logout and continue if is online - Criminal - 10-05-2015 11:31 PM

I do similar thing, thanks mate.