bearnope246 Posted August 4, 2016 Posted August 4, 2016 if((gettimetick(2) - #login) - (gettimetick(2)- #logout) > 3600) So time doesn't count when logout? Quote
0 bearnope246 Posted August 5, 2016 Author Posted August 5, 2016 gettimetick(2) from onlogin and onlogout event? Iknow i messed up, How to make a timer that only count when they are in game? thanks Quote
0 Emistry Posted August 5, 2016 Posted August 5, 2016 OnPCLoginEvent: @online_time = gettimetick(2); end; OnPCLogoutEvent: #total_online_time += ( gettimetick(2) - @online_time ); end; Quote
0 bearnope246 Posted August 5, 2016 Author Posted August 5, 2016 OnPCLoginEvent: @online_time = gettimetick(2); end; OnPCLogoutEvent: #total_online_time += ( gettimetick(2) - @online_time ); end; i kneed to get te var right away, not only when they logout will ontimer work? Im redo my script like this: OnPCLoginEvent: if(!#login){ #login = gettimetick(2);} end; OnPCLogoutEvent: #logout = gettimetick(2); end; set .@online, gettimetick(2)- #login -(gettimetick(2)-#logout); if( .@online > 3600){ mes"ok"; close;} else{ set .@left, .@online/60; mes ""+.@left+" minutes left." close; } is this ok? Quote
Question
bearnope246
So time doesn't count when logout?
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.