s1mple Posted October 22, 2015 Posted October 22, 2015 error [2015-10-22 05:08:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2015-10-22 05:08:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2015-10-22 05:08:10] ERROR: [resources]\Duty\Server.lua:27: attempt to concatenate local 'accName' (a boolean value) [2015-10-22 05:09:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2015-10-22 05:09:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2015-10-22 05:09:10] ERROR: [resources]\Duty\Server.lua:27: attempt to concatenate local 'accName' (a boolean value) [2015-10-22 05:10:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2015-10-22 05:10:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2015-10-22 05:10:10] ERROR: [resources]\Duty\Server.lua:27: attempt to concatenate local 'accName' (a boolean value) [2015-10-22 05:11:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2015-10-22 05:11:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2015-10-22 05:11:10] ERROR: [resources]\Duty\Server.lua:27: attempt to concatenate local 'accName' (a boolean value) [2015-10-22 05:12:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2015-10-22 05:12:10] WARNING: [resources]\Duty\Server.lua:26: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2015-10-22 05:12:10] ERROR: [resources]\Duty\Server.lua:27: attempt to concatenate local 'accName' (a boolean value) client addEvent ( "onDuty", true ) function duty() if getElementData(source,"duty") == true then timer = setTimer ( function() setElementData(source,"onDuty",true) local x, y, z = getElementPosition(source ) local playerName = getPlayerName(source ) local theText = dxDraw3DText( "Admin On Duty [NO DM]", x, y, z+1,05,"default",255,0,0,200) setTimer ( function() destroyElement(theText) end, 59, 1) end, 60, 0 ) else if isTimer(timer) then killTimer(timer) end setElementData(source,"duty",true) end end addEventHandler ( "onDuty", root, duty) server function aduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." Is Now OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is Now OnDuty!") setElementData( player, "blood", 99999999999999999999999 ) heal = "9999999999999999999999999999" triggerClientEvent(player,"onDuty",getRootElement()) end end addCommandHandler("duty",aduty) function offaduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." Is No Longer OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is No Longer OnDuty!") setElementData( player, "blood", 12000 ) end end addCommandHandler("offaduty",offduty) 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) and, can anyone make like now with blood, like godmode, no pain, no brokenbone
1LoL1 Posted October 22, 2015 Posted October 22, 2015 setElementData( player, "blood", 99999999999999999999999 ) setElementData( player, "bleeding", 0) setElementData( player, "brokenbone", false)
Tomas Posted October 22, 2015 Posted October 22, 2015 function heal_func () for i, player in ipairs ( getElementsByType("player") ) do 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 end setTimer(heal_func, 60000, 0)
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