GamingTim Posted April 14, 2014 Share 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] Link to comment
justn Posted April 14, 2014 Share Posted April 14, 2014 It's outputChatBox not outputChatbox Link to comment
Moderators IIYAMA Posted April 14, 2014 Moderators Share Posted April 14, 2014 and remove/disable: addEventHandler("onPlayerCommand",root,setAdminTeam) You don't need that. Link to comment
GamingTim Posted April 14, 2014 Author Share Posted April 14, 2014 I usually make noob punctuation and case sensitive errors, thanks alot! Link to comment
GamingTim Posted April 14, 2014 Author Share Posted April 14, 2014 and remove/disable: addEventHandler("onPlayerCommand",root,setAdminTeam)You don't need that. Yeah i'll remove that thanks for telling. 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