Jump to content

Duty


stefutz101

Recommended Posts

Posted
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:

560x95_FFFFFF_B7FF00_000000_000000.png
Posted
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) 

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast

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...