So i use the Free DarkRP leveling system http://steamcommunity.com/sharedfiles/filedetails/?id=270216963
What I am trying to do is create a hook or function that when a player goes afk they wont earn exp. I dont know much of lua but I think I might be on the right track. If the hook is right do i need to define one for if they leave afk? Also where would i need to add the hook at?
Thanks for any help provided!
local function StartAFKOnPlayer(ply) LevelSystemConfiguration.Timertime = 300 end hook.Add("PlayerInitialSpawn", "StartAFKOnPlayer", StartAFKOnPlayer)
[editline]23rd July 2014[/editline]
Or would it be more along the lines of this. I have no idea what the difference is between the two.
if ply.DarkRPVars.AFK then LevelSystemConfiguration.Timertime = 0 else LevelSystemConfiguration.Timetime = 300 end end
Sorry about that, Ive never used facepunch before. Im kinda new to all this