Jump to content

GUI to choose skin.


Shazzimal

Recommended Posts

Hey guys,

I want to create a script that will show up a GUI when the player logs in to choose a skin. And always when a player gets alive. Couse everytime when someone dies on my server, they will get another skin automaticaly. What i always want in my script is that every admin wil get this skin: ID 286.

Which contents must contain in my script?

Thanks

Link to comment
  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Sorry for waiting, but this is my 1st part:

client-sided?

function setAdminSkin() 
    if hasObjectPermissionTo(thePlayer, "command.ban", true) then 
        setPlayerSkin(thePlayer, 286) 
        outputChatBox("Welcome admin, your skin has been set to: Admin server skin.",thePlayer) 
    end 
end 

meta.xml

<meta> 
    <info author="Shazzimal" name="SkinChooser" disc="When you log on, you can select a skin, admin does automaticaly get skin ID286." Version="1.0.0"/> 
    <script src="client.lua" type=client/> 
</meta> 

Link to comment
Sorry for waiting, but this is my 1st part:

client-sided?

function setAdminSkin() 
    if hasObjectPermissionTo(thePlayer, "command.ban", true) then 
        setPlayerSkin(thePlayer, 286) 
        outputChatBox("Welcome admin, your skin has been set to: Admin server skin.",thePlayer) 
    end 
end 

meta.xml

<meta> 
    <info author="Shazzimal" name="SkinChooser" disc="When you log on, you can select a skin, admin does automaticaly get skin ID286." Version="1.0.0"/> 
    <script src="client.lua" type=client/> 
</meta> 

the Player is not defined server side .

Link to comment

And If You Want To Do It On Player Login With Out Gui Or What Ever Server Side :

function setAdminSkin() 
    if hasObjectPermissionTo(source, "command.ban", true) then 
        setElementModel(source,268) 
        outputChatBox("Welcome admin, your skin has been set to: Admin server skin.",source,255,0,0) 
    end 
end 
addEventHandler("onPlayerLogin",root,setAdminSkin) 

Have Fun

:mrgreen:

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...