stefutz101 Posted August 1, 2015 Share Posted August 1, 2015 function giveblood (thePlayer) count = 0 local accountname = getAccountName ( getPlayerAccount ( thePlayer )) if count == 0 then if isObjectInACLGroup ( "user." ..accountname, aclGetGroup ( "Admin" )) or isObjectInACLGroup ( "user." ..accountname, aclGetGroup ( "SuperModerator" )) then outputChatBox ("#1AFF00 Adminul "..getPlayerName(thePlayer).."#1AFF00 este on Duty !",root,255,255,255,true) setElementData(thePlayer, "blood",999999999999999) outputServerLog("Adminul "..getPlayerName(thePlayer).." este on Duty!") count = count +1 else outputChatBox ("#FF0000 Adminul "..getPlayerName(thePlayer).."#FF0000 este off Duty !",root,255,255,255,true) setElementData(thePlayer, "blood",12000) outputServerLog("Adminul "..getPlayerName(thePlayer).." este offDuty!") count = count -1 end end end addCommandHandler("duty", giveblood) Offduty dont work . And Supermoderators can't put on duty , lol . Link to comment
GTX Posted August 1, 2015 Share Posted August 1, 2015 function giveblood (thePlayer) local accountname = getAccountName ( getPlayerAccount ( thePlayer )) if isObjectInACLGroup ( "user." ..accountname, aclGetGroup ( "Admin" )) or isObjectInACLGroup ( "user." ..accountname, aclGetGroup ( "SuperModerator" )) then if getElementData(thePlayer, "duty") ~= true then outputChatBox ("#1AFF00 Adminul "..getPlayerName(thePlayer).."#1AFF00 este on Duty !",root,255,255,255,true) setElementData(thePlayer, "blood",999999999999999) outputServerLog("Adminul "..getPlayerName(thePlayer).." este on Duty!") setElementData(thePlayer, "duty", true) else outputChatBox ("#FF0000 Adminul "..getPlayerName(thePlayer).."#FF0000 este off Duty !",root,255,255,255,true) setElementData(thePlayer, "blood",12000) outputServerLog("Adminul "..getPlayerName(thePlayer).." este offDuty!") setElementData(thePlayer, "duty", false) end end end addCommandHandler("duty", giveblood) Link to comment
stefutz101 Posted August 1, 2015 Author Share Posted August 1, 2015 Yes , lol thank you , but SuperModerators can't use this command 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