HoratioCaine Posted July 22, 2013 Share Posted July 22, 2013 I need a script or something else that restrict the skin 217 for the admin Link to comment
Vector Posted July 22, 2013 Share Posted July 22, 2013 server-side addEventHandler ("onElementModelChange", getRootElement (), function (oldModel, newModel) local function isPlayerAdmin (thePlayer) local aclAdminGroup = aclGetGroup ("Admin"); local playerAccount = getPlayerAccount (thePlayer); local playerAccountName = getAccountName (playerAccount); return isObjectInACLGroup ("user." .. playerAccountName, aclAdminGroup); end; if getElementType (source) ~= "player" then return; end; if (newModel == 217) and (not isPlayerAdmin (source)) then outputChatBox (getPlayerName (source) .. ", skin 217 is just for admins!", source, 255, 0, 0); -- restore old skin. if oldModel == 217 then return; end; -- avoid stack overflow. -- small delay to restore again the model. setTimer (setElementModel, 50, 1, source, oldModel); end; end); 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