Dimmitry007 Posted November 12, 2014 Share Posted November 12, 2014 hello i have a server and i have duty script i bought it but i got a problem it doesnt show the arrow on my head [ADMIN ON DUTY NO SHOOTING] and i get broken bone and bandge the second problem my health doesnt heal ;/ i have bought the script ;/ Link to comment
Dimmitry007 Posted November 13, 2014 Author Share Posted November 13, 2014 function aduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox("Admin "..getPlayerName(player).." Is Now OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog("Admin "..getPlayerName(player).." Is Now OnDuty!") setElementData( player, "blood", 999999999999999 ) heal = "999999999999999" end end addCommandHandler("aduty",aduty) function offaduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox("Admin "..getPlayerName(player).." Is No Longer OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog("Admin "..getPlayerName(player).." Is No Longer OnDuty!") setElementData( player, "blood", 12000 ) end end addCommandHandler("offduty",offaduty) function heal_func ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then if heal == "an" then setElementData( player, "food", 250 ) setElementData( player, "thirst", 250 ) end end end setTimer(heal_func, 60000, 0) Link to comment
Tekken Posted November 13, 2014 Share Posted November 13, 2014 (edited) try this function aduty(player) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then setElementData(player, "blood", 9999999) outputChatBox("Admin "..getPlayerName(player).." Is Now OnDuty!",getRootElement(),255,0,0) outputServerLog("Admin "..getPlayerName(player).." Is Now OnDuty!") end end addCommandHandler("onduty", suicidex, false) function aoffduty(player) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then setElementData(player, "blood", 12000) outputChatBox("Admin "..getPlayerName(player).." Is Now OffDuty!",getRootElement(),255,0,0) outputServerLog("Admin "..getPlayerName(player).." Is Now OffDuty!") end end addCommandHandler("offduty", suicidex, false) function heal_func ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then if heal == "an" then setElementData( player, "food", 250 ) setElementData( player, "thirst", 250 ) setElementData( player, "blood", 12000 ) end end end addCommandHandler("aheal", heal_func, false) Edited November 16, 2014 by Guest Link to comment
TAPL Posted November 13, 2014 Share Posted November 13, 2014 ^^ player or thePlayer? -_-" heal not defined. Link to comment
Tekken Posted November 13, 2014 Share Posted November 13, 2014 (edited) >_ Edited November 13, 2014 by Guest 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