hello,
You could add: record the duration of the afk for each player in log file?
edit: Oh i found log in data folder but is not correctly...
AFK plugin kicked 76561198050287733 after 5min... and your logCode:{ "timeData": { "76561197984580089": { "playTime": 4315.539999961853, "afkTime": 0.0, "lastReward": 0.0, "referrals": 0 }, "76561198050287733": { "playTime": 3239.9189999103546, "afkTime": 0.0, "lastReward": 0.0, "referrals": 0 } } }or i'm wrong?Code:"afkTime": 0.0,
my config:
Code:{ "Options": { "SaveTimer": 10, "TrackAFKTime": true }, "ReferralSystem": { "IssueRewardForReferral": false, "UseReferralSystem": false }, "RewardSystem": { "Enabled": false, "Points": { "Playtime_Points": 5, "Playtime_PointTimer": 3600, "Referral_InvitePoints": 5, "Referral_JoinPoints": 3 }, "RewardPlugins": { "Hurtworld": { "Economy": false }, "Rust": { "Economics": false, "ServerRewards": false }, "Universal": { "UEconomics": false } }, "SendDepositMessage": false } }
PlaytimeTracker
Moved
Total Downloads: 4,803 - First Release: Sep 9, 2016 - Last Update: Nov 10, 2017
- 5/5, 10 likes
-
Everyone on my server keeps getting "Unable to find player with that name". obviously we've tried using quotes, reloading plugin, tried multiple players, and even tried deleting data files while the plugin was unloaded, still no progress. am i doing something wrong?
-
Im having an issue with this plugin atm, the timer works, but sending RP does not work for me anymore
please help : |
Code:{ "Options": { "SaveTimer": 15, "TrackAFKTime": false }, "ReferralSystem": { "IssueRewardForReferral": true, "UseReferralSystem": false }, "RewardSystem": { "Enabled": true, "Points": { "Playtime_Points": 350, "Playtime_PointTimer": 5, "Referral_InvitePoints": 3, "Referral_JoinPoints": 1 }, "RewardPlugins": { "Hurtworld": { "Economy": false }, "Rust": { "Economics": false, "ServerRewards": true }, "Universal": { "UEconomics": false } }, "SendDepositMessage": true } }
Screenshot: http://puu.sh/va5e0/d19f0f9874.jpg
some time later
Screenshot: http://puu.sh/va5pl/10d961351e.jpgLast edited by a moderator: Apr 5, 2017 -
Im sorry i just found out that my bios battery was empty the plugin works fine, i just replaced the battery -
AFK not working for me! I find connected user. He sleep many minutes. But no changes in log.
-
This part:
Code:bool CheckPosition(IPlayer player) { if (player?.Position() == null) return false; if (posCache.ContainsKey(player.Id)) { if (posCache[player.Id] == player.Position()) return true; } return false; }
Code:bool CheckPosition(IPlayer player) { if (player?.Position() == null) return false; if (posCache.ContainsKey(player.Id)) { var last = posCache[player.Id]; var current = player.Position(); if (last.X.Equals(current.X)) return true; } return false; }
-
Hi guys I am lost on this plug, It will not issue money to players at all but it will track time. Any ideas?
Attached Files:
-
-
Feature Request: An option to track offline player time to grant points equal to online players. Because casual players get ripped off in Rust.
-
i have this Error
Code:14:57 [Error] Failed to run a 60.00 timer in 'PlaytimeTracker v0.1.5' (NullReferenceException: ) 14:57 [Stacktrace] at (wrapper managed-to-native) UnityEngine.Component:get_transform () at Oxide.Game.Rust.Libraries.Player.Position (.BasePlayer player) [0x00000] in <filename unknown>:0 at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Position () [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.CheckPosition (IPlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.AddTime (IPlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.ResetTimer (IPlayer player, Boolean isNew) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker+<ResetTimer>c__AnonStorey0.<>m__1 () [0x00000] in <filename unknown>:0 at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00000] in <filename unknown>:0
-
Hello Im having an issue that everytime my server restarts players points are reset, even though the playtime is still tracking, can someone please tell me how to prevent player points from being wiped on server restarts, my server restarts every 24 hours and I want players to be able to retain points indefinately. Thanks in advance.
Also is it possible for players to accumilate points whilst sleeping if still connected but AFK? if so how do i achieve this. -
-
{
"timeData": {
"76561198165440944": {
"playTime": 31805.45082950592,
"afkTime": 0.0,
"lastReward": 30600.0,
"referrals": 0
},
"76561198305878695": {
"playTime": 85.326629161834717,
"afkTime": 0.0,
"lastReward": 0.0,
"referrals": 0
},
"76561198253336347": {
"playTime": 5100.157767534256,
"afkTime": 0.0,
"lastReward": 3600.0,
"referrals": 0
}
}
}
I am the top player in the file and as you can see it keeps trak of my playtime and last rewards, I havnt done any referrals or set up any VIP permissions so both these files are empty, when I open server rewards store I can still see my total play time, its just my points have been reset to zero, even though ive not spent any, I start accumilating them again but if I do a simple restart they reset still. -
Have you recently updated to ServerRewards 0.4.0? It's a big change I think and would reset your points.
-
-
@k1lly0u,@Wulf
it's not tracking afk cause it can't compare GenericPosition?
wrote to debug it
Code:if (posCache.ContainsKey(player.Id)) { Puts($"checkafk {posCache[player.Id]} {player.Position()}"); if (posCache[player.Id]== player.Position()) { Puts("isafk"); return true; } }
-
Wulf Community Admin
-
-
i have this error
Code:(13:06:13) | Failed to call hook 'OnUserConnected' on plugin 'PlaytimeTracker v0.1.5' (ArgumentException: An element with the same key already exists in the dictionary.) (13:06:14) | at System.Collections.Generic.Dictionary`2[System.String,Oxide.Plugins.Timer].Add (System.String key, Oxide.Plugins.Timer value) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.ResetTimer (IPlayer player, Boolean isNew) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.InitPlayerData (IPlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.OnUserConnected (IPlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
-
Wulf Community Admin
Wulf updated Playtime Tracker with a new update entry:
0.1.6
-
No matter what I put in the config for "Playtime_PointTimer": 3600, it will always be every 1 min to give out RP, the only way around this is to edit the cs file.