GamingTim Posted April 14, 2014 Posted April 14, 2014 Well here's the code, I tested it,no errors but the weird thing is that it doesnt output the text to a player. [code=text]function setAdminTeam (player, command) local accName = getAccountName (getPlayerAccount (player)) if isObjectInACLGroup("user."..accName, aclGetGroup ("Admin")) then setPlayerTeam (player, Admin) else outputChatbox ( "Ha, you're not an admin.", player) end end addCommandHandler("togadmin",setAdminTeam) addEventHandler("onPlayerCommand",root,setAdminTeam) [/code]
Moderators IIYAMA Posted April 14, 2014 Moderators Posted April 14, 2014 and remove/disable: addEventHandler("onPlayerCommand",root,setAdminTeam) You don't need that.
GamingTim Posted April 14, 2014 Author Posted April 14, 2014 I usually make noob punctuation and case sensitive errors, thanks alot!
GamingTim Posted April 14, 2014 Author Posted April 14, 2014 and remove/disable: addEventHandler("onPlayerCommand",root,setAdminTeam)You don't need that. Yeah i'll remove that thanks for telling.
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