Fory Posted April 23, 2021 Posted April 23, 2021 Hello everyone 1-2 ideas would be needed, how I shall begin it how new AFK to a system, this would be only so much that the chatboxba announces it that: outputChatBox("#efad5f[AFK]: " Name " 5 of his minutes AFK", getRootElement(), 255, 255, 255, true) else outputChatBox("#efad5f[AFK]: "name" back up", getRootElement(), 255, 255, 255, true) --------------------NEXT---------------------- outputChatBox("#efad5f[AFK]: " Name " 10 of his minutes AFK", getRootElement(), 255, 255, 255, true) else outputChatBox("#efad5f[AFK]: "name" back up", getRootElement(), 255, 255, 255, true) For somebody, some idea?
Moderators Patrick Posted April 23, 2021 Moderators Posted April 23, 2021 You can use getPlayerIdleTime, thats make it really easy.
Fory Posted April 23, 2021 Author Posted April 23, 2021 Valami hibát ír a 12. Sorban setTimer( function () if getElementData(getLocalPlayer(),"afk") == false then local getLocalPlayer = targetPlayer setElementData (getLocalPlayer(),"afk",true) outputChatBox("#efad5f[AFK]: #42c2d2" .. targetPlayer .. "#ffffff 5 of his minutes AFK.", getRootElement(), 255, 255, 255, true) else setElementData (getLocalPlayer(),"afk",false) outputChatBox("#efad5f[AFK]: #42c2d2" .. targetPlayer .. "#ffffff Back Up.", getRootElement(), 255, 255, 255, true) end end end 2500, 0)
Fory Posted April 23, 2021 Author Posted April 23, 2021 ERROR: Loading script failed: var_afk\server.lua:7:')' expected (to close '(' at line 1) near 'end' ezt írja ki, de nem tudom hogy miért.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now