bearnope246 Posted August 4, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Share Posted August 4, 2016 if((gettimetick(2) - #login) - (gettimetick(2)- #logout) > 3600) So time doesn't count when logout? Quote Link to comment Share on other sites More sharing options...
0 nitrous Posted August 5, 2016 Group: Developer Topic Count: 4 Topics Per Day: 0.00 Content Count: 141 Reputation: 46 Joined: 08/14/12 Last Seen: 6 hours ago Share Posted August 5, 2016 What does #login and #logout contain? Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted August 5, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted August 5, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 8 hours ago Share Posted August 5, 2016 OnPCLoginEvent: @online_time = gettimetick(2); end; OnPCLogoutEvent: #total_online_time += ( gettimetick(2) - @online_time ); end; Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted August 5, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share 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 Link to comment Share on other sites More sharing options...
Question
bearnope246
So time doesn't count when logout?
Link to comment
Share on other sites
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.