Manic69 Posted March 11, 2017 Share Posted March 11, 2017 Hello! Can someone help me,I have this simple duty script function giveblood (thePlayer) local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then end outputChatBox ("#6B8E23 [Owner] #FFFFFF"..getPlayerName(thePlayer).."#1AFF00 Is now onduty NO DM !",root,255,255,255,true) setElementData(thePlayer, "blood",999999999) end addCommandHandler("duty", giveblood) function bloodback(thePlayer) local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then end outputChatBox ("#6B8E23 [Owner] #FFFFFF"..getPlayerName(thePlayer).."#FF0000 Is now offduty",root,255,255,255,true) setElementData(thePlayer, "blood",12000) end addCommandHandler("offduty", bloodback) The problem is that everyone works not only for admin. And if someone know how to add 3D text write me pls TY! Link to comment
Abdul KariM Posted March 11, 2017 Share Posted March 11, 2017 what do you want to do ? and use this function https://wiki.multitheftauto.com/wiki/DxDrawTextOnElement to 3d text Link to comment
Manic69 Posted March 11, 2017 Author Share Posted March 11, 2017 pls help me write it (sorry my bad eng ) Link to comment
Moderators Citizen Posted March 11, 2017 Moderators Share Posted March 11, 2017 The code for admins should have been INSIDE the "if" statement that checks for admin ACL group: function giveblood (thePlayer) local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox ("#6B8E23 [Owner] #FFFFFF"..getPlayerName(thePlayer).."#1AFF00 Is now onduty NO DM !",root,255,255,255,true) setElementData(thePlayer, "blood", 999999999) end end addCommandHandler("duty", giveblood) function bloodback(thePlayer) local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox ("#6B8E23 [Owner] #FFFFFF"..getPlayerName(thePlayer).."#FF0000 Is now offduty",root,255,255,255,true) setElementData(thePlayer, "blood", 12000) end end addCommandHandler("offduty", bloodback) Link to comment
Fist Posted March 12, 2017 Share Posted March 12, 2017 I can recommend you to use my DayZ Admin panel, it has built-in duty mode which works way better than just setting blood to 999... also you can fly when you're on duty. + some other admin features. https://community.multitheftauto.com/index.php?p=resources&s=details&id=14187 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