Jump to content

Skin changer with GUI


mouadys

Recommended Posts

Hello , i want to make a skin editor that changes other or your player skins that you open with a command (/skineditor) and there you find a combobox and a button

The combobox contains some Skins and the button is to set your or someone skin .

As i'm new in scripting , i dont know what to do , i used GUI Editor and i made this GUI but i dont know what to do next on both serverside and clienside

  
GUIEditor = { 
    label = {}, 
    edit = {}, 
    button = {}, 
    window = {}, 
    combobox = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(451, 289, 327, 426, "Skin", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.combobox[1] = guiCreateComboBox(48, 322, 258, 94, "", false, GUIEditor.window[1]) 
        guiComboBoxAddItem(GUIEditor.combobox[1], "SWAT skin") 
        guiComboBoxAddItem(GUIEditor.combobox[1], "Army Skin") 
        GUIEditor.button[1] = guiCreateButton(68, 360, 197, 44, "Get Skin", false, GUIEditor.window[1]) 
        GUIEditor.memo[1] = guiCreateMemo(27, 63, 279, 163, "This GUI allows you to get a custom skin for you or a player name", false, GUIEditor.window[1]) 
        GUIEditor.edit[1] = guiCreateEdit(47, 261, 255, 31, "", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(129, 242, 218, 15, "Player Name :", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(142, 299, 159, 23, "Skin :", false, GUIEditor.window[1])     
    end 
) 
  

Link to comment

This will open the GUI with /skineditor ..

But you'll need a Close-Button to Cose the panel ^^

GUIEditor = { 
    label = {}, 
    edit = {}, 
    button = {}, 
    window = {}, 
    combobox = {}, 
    memo = {} 
} 
  
  
        GUIEditor.window[1] = guiCreateWindow(451, 289, 327, 426, "Skin", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.combobox[1] = guiCreateComboBox(48, 322, 258, 94, "", false, GUIEditor.window[1]) 
        guiComboBoxAddItem(GUIEditor.combobox[1], "SWAT skin") 
        guiComboBoxAddItem(GUIEditor.combobox[1], "Army Skin") 
        GUIEditor.button[1] = guiCreateButton(68, 360, 197, 44, "Get Skin", false, GUIEditor.window[1]) 
        GUIEditor.memo[1] = guiCreateMemo(27, 63, 279, 163, "This GUI allows you to get a custom skin for you or a player name", false, GUIEditor.window[1]) 
        GUIEditor.edit[1] = guiCreateEdit(47, 261, 255, 31, "", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(129, 242, 218, 15, "Player Name :", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(142, 299, 159, 23, "Skin :", false, GUIEditor.window[1])     
  
  
        guiSetVisible(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.combobox[1], false) 
        guiSetVisible(GUIEditor.button[1], false) 
        guiSetVisible(GUIEditor.memo[1], false) 
        guiSetVisible(GUIEditor.edit[1], false) 
        guiSetVisible(GUIEditor.label[2], false) 
        guiSetVisible(GUIEditor.label[1], false) 
  
function OpenGUI() 
        guiSetVisible(GUIEditor.window[1], true) 
        guiSetVisible(GUIEditor.combobox[1], true) 
        guiSetVisible(GUIEditor.button[1], true) 
        guiSetVisible(GUIEditor.memo[1], true) 
        guiSetVisible(GUIEditor.edit[1], true) 
        guiSetVisible(GUIEditor.label[2], true) 
        guiSetVisible(GUIEditor.label[1], true) 
        showCursor(true) 
end 
addCommandHandler("skineditor", OpenGUI) 

I don't script everything for you.

Some functions :

To set the Skin of the player :

triggerServerEvent 
setElementModel 
addEvent 
addEventHandler 
  

Link to comment
This will open the GUI with /skineditor ..

But you'll need a Close-Button to Cose the panel ^^

GUIEditor = { 
    label = {}, 
    edit = {}, 
    button = {}, 
    window = {}, 
    combobox = {}, 
    memo = {} 
} 
  
  
        GUIEditor.window[1] = guiCreateWindow(451, 289, 327, 426, "Skin", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.combobox[1] = guiCreateComboBox(48, 322, 258, 94, "", false, GUIEditor.window[1]) 
        guiComboBoxAddItem(GUIEditor.combobox[1], "SWAT skin") 
        guiComboBoxAddItem(GUIEditor.combobox[1], "Army Skin") 
        GUIEditor.button[1] = guiCreateButton(68, 360, 197, 44, "Get Skin", false, GUIEditor.window[1]) 
        GUIEditor.memo[1] = guiCreateMemo(27, 63, 279, 163, "This GUI allows you to get a custom skin for you or a player name", false, GUIEditor.window[1]) 
        GUIEditor.edit[1] = guiCreateEdit(47, 261, 255, 31, "", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(129, 242, 218, 15, "Player Name :", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(142, 299, 159, 23, "Skin :", false, GUIEditor.window[1])     
  
  
        guiSetVisible(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.combobox[1], false) 
        guiSetVisible(GUIEditor.button[1], false) 
        guiSetVisible(GUIEditor.memo[1], false) 
        guiSetVisible(GUIEditor.edit[1], false) 
        guiSetVisible(GUIEditor.label[2], false) 
        guiSetVisible(GUIEditor.label[1], false) 
  
function OpenGUI() 
        guiSetVisible(GUIEditor.window[1], true) 
        guiSetVisible(GUIEditor.combobox[1], true) 
        guiSetVisible(GUIEditor.button[1], true) 
        guiSetVisible(GUIEditor.memo[1], true) 
        guiSetVisible(GUIEditor.edit[1], true) 
        guiSetVisible(GUIEditor.label[2], true) 
        guiSetVisible(GUIEditor.label[1], true) 
        showCursor(true) 
end 
addCommandHandler("skineditor", OpenGUI) 

I don't script everything for you.

Some functions :

To set the Skin of the player :

triggerServerEvent 
setElementModel 
addEvent 
addEventHandler 
  

Fixed

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