Jump to content

changeSkin (Doesn't work at all)


Recommended Posts

  
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...