Behnam Posted July 26, 2018 Share Posted July 26, 2018 Hi all. Please give me a freeze and unfreeze system for acl group admin ! command: /freeze <PlayerName> outputChatBox: You Freezed <nameplayer> /unfreeze <PlayerName> outputChatBox: You Unfreezed <nameplayer> And For outputChatBox Player: You Freezed By Admin <nameadmin> outputChatBox For Unfreeze: You Unfreezed By <nameadmin> Thanks. Link to comment
Erknneto Posted July 26, 2018 Share Posted July 26, 2018 function adminFreeze (source,command,name) local acc = getAccountName(getPlayerAccount(source)) if ( isObjectInACLGroup("user."..acc,aclGetGroup("Admin")) ) then local selectedPlayer = getPlayerFromName(name) if ( selectedPlayer ) then if ( isElementFrozen(selectedPlayer) ) then setElementFrozen(selectedPlayer,false) outputChatBox("You have unfrozen the player "..name.."!",source,0,255,0) outputChatBox("You have been unfrozen by the Admin "..getPlayerName(source).."!",selectedPlayer,0,255,0) return end setElementFrozen(selectedPlayer,true) outputChatBox("You have frozen the player "..name.."!",source,0,255,0) outputChatBox("You have been frozen by the Admin "..getPlayerName(source).."!",selectedPlayer,255,0,0) else outputChatBox("Invalid player!",source,255,0,0) end end end addCommandHandler("freeze",adminFreeze) You don't need the "/unfrozen" command, you can use "/freeze" to make the both actions. 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