Mr.Mostafa Posted April 24, 2018 Share Posted April 24, 2018 آلسلام عليكم آبي آن لمآ يكون آفك تيجي فوق رآسه صورة آبي لمآ شخص مآ يلمس آلكيبورد آو يحرك آلمآوس لمدة دقيقة - يجي آنه آفك + + آبي لو كتب آفك يروح آفك ولو كتب آفك تآني يرجع آلمشكلة هنآ لمآ يكتب آفك يروح آفك لكن لآزم يكتب بآك عشآن يرجع afkmads = {} addEventHandler("onPlayerDamage", root, function(attacker, weapon, bodypart, hp) if afkmads[source] then setElementHealth(source, getElementHealth(source)+hp) end end ) addCommandHandler("afk", function(sot) if getPlayerWantedLevel(sot) > 0 then return outputChatBox("You Can't Go AFK! You Have A Wanted Level!", sot, 255, 0, 0) end afkmads[sot] = true setElementFrozen(sot, true) toggleAllControls(sot, false, true, false) setElementAlpha(sot, 120) setPlayerNametagShowing(sot, false) outputChatBox("You Are Now AFK!", sot, 255, 0, 0) end ) addCommandHandler("back", function(sot) setElementFrozen(sot, false) toggleAllControls(sot, true) setElementAlpha(sot, 255) afkmads[sot] = nil setPlayerNametagShowing(sot, true) outputChatBox("You Are Back!", sot, 0, 255, 0) end ) function setAFKNametag(thePlayer) setPlayerNametagText(thePlayer, "(AFK)"..getPlayerName(thePlayer)) end Link to comment
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