BriGhtx3 Posted May 21, 2011 Share Posted May 21, 2011 local AdminCommand = {} AdminCommand["changeSkin"]=3 function changeSkin ( thePlayer, command, player, skinid ) if isAdmin( thePlayer, AdminCommand[string.lower(command)] ) then if player and tonumber(skinid) then local playerid = getPlayerFromName( player ) if playerid then setElementModel ( thePlayer, skinid ) else outputChatBox("Der angegebene Spieler existiert nicht!",thePlayer) end else outputChatBox("BENUTZUNG: /setskin [spieler] [skin-ID]",thePlayer) end else outputChatBox( "Du hast nicht das Recht dazu!", thePlayer ) end end addCommandHandler("setskin", changeSkin) It doesn't even show me an error or the "BENUTZUNG". Greetz ~ Link to comment
Arran Posted May 21, 2011 Share Posted May 21, 2011 Then obviously: if isAdmin( thePlayer, AdminCommand[string.lower(command)] ) then Does not pass. Try and use something better like hasObjectPermissionTo instead of your own isAdmin, which by the sounds of it doesn't work. Fails because: AdminCommand["changeSkin"]=3 addCommandHandler("setskin", changeSkin) Do you not notice an incosistency? setskin vs ChangeSkin (they're meant to be the same) Link to comment
BriGhtx3 Posted May 21, 2011 Author Share Posted May 21, 2011 Yeah! Thanks! it was obviously -.- I use the isAdmin because i work with a database and without acl. 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