Dardex Posted June 22, 2013 Share Posted June 22, 2013 Hi guys I'm new at scripting but I know a lot of it.I have a script called superman that allows players to fly but i would like that script to be usable only from admins/supermoderators not from everyone. local Superman = {} -- Static global values local rootElement = getRootElement() local thisResource = getThisResource() -- Resource events addEvent("superman:start", true) addEvent("superman:stop", true) -- -- Start/stop functions -- function Superman.Start() local self = Superman addEventHandler("superman:start", rootElement, self.clientStart) addEventHandler("superman:stop", rootElement, self.clientStop) end addEventHandler("onResourceStart", getResourceRootElement(thisResource), Superman.Start, false) function Superman.clientStart() setElementData(client, "superman:flying", true) end function Superman.clientStop() setElementData(client, "superman:flying", false) end Link to comment
iPrestege Posted June 22, 2013 Share Posted June 22, 2013 isObjectInACLGroup getAccountName and getPlayerAccount Link to comment
PaiN^ Posted June 22, 2013 Share Posted June 22, 2013 and please use [lua][ /lua] tag while posting lua codes 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