Jump to content

Duty


stefutz101

Recommended Posts

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 . :(:cry:

Link to comment
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...