Jump to content

[Help] Upgraded Skin Selector


TDK

Recommended Posts

Hi! it's me again=D i have read and learn basics of acripting, and my 1 gui script is Nich's skin selector Remix...

but i have a problem: i don't see a gui, help plz) anybody have any ideas?? see down....

 

function CreateSelectorWindow()
wdwselector = guiCreateWindow(409,913,454,106,"",true)
guiWindowSetMovable(wdwselector,false)
btnLeft = guiCreateButton(9,51,70,46,"<<",true,wdwselector)
btnRight = guiCreateButton(374,51,71,46,">>",true,wdwselector)
btnSelect = guiCreateButton(80,51,72,46,"OK",true,wdwselector)
cartinka = guiCreateStaticImage(81,9,296,57,"images/skinmenu.png",false,wdwselector)
guiSetVisible(wdwselector, false)
end
 
function selectorenable ()
CreateSelectorWindow()
addEventHandler("onClientGUIClick", btnLeft, clientSkinLeft, false)
addEventHandler("onClientGUIClick", btnSelect, clientSkinSelect, false)
addEventHandler("onClientGUIClick", btnRight, clientSkinRight, false)
if (wdwselector ~= nil) then
guiSetVisible(wdwselector, true)
triggerServerEvent("FrontCamera", getLocalPlayer())
end
showCursor(true)
end
addCommandHandler("skin", selectorenable, false, false)
 
function clientSkinSelect(button)
guiSetVisible(wdwselector, false)
showCursor(false)
triggerServerEvent("SkinSelected", getLocalPlayer())
end
 
function clientSkinRight(button)
triggerServerEvent("SkinRight", getLocalPlayer())
end
 
function clientSkinLeft(button)
triggerServerEvent("SkinLeft", getLocalPlayer())
end

Edited by Guest
Link to comment

I don't understand why you've put guiSetVisible(wdwselector, false) in a function which creates the window and you show the window after you add event handler and why don't you move addEventHandlers to the CreateSelectorWindow instead of having them in another function?

Link to comment
addCommandHandler("skin", selectorenable, false, false)

you must type /skin to open the window ...

LoL i know it=DD but gui don't works..(( and cursos will arive hm...

in russian language: я знаю это=D но гуи всё равно не пашет..(( токо курсор появляется...

Link to comment
addCommandHandler("skin", selectorenable, false, false)

you must type /skin to open the window ...

LoL i know it=DD but gui don't works..(( and cursos will arive hm...

in russian language: я знаю это=D но гуи всё равно не пашет..(( токо курсор появляется...

Will you ask my questions?

Link to comment
I don't understand why you've put guiSetVisible(wdwselector, false) in a function which creates the window and you show the window after you add event handler and why don't you move addEventHandlers to the CreateSelectorWindow instead of having them in another function?

setguiviseble=false because it's create gui, but i need to hide it, it's will show if you type SKIN in console or chat.....

addeventhandlers to the CreateSelectorWindow.. i need it?)))

Link to comment
I don't understand why you've put guiSetVisible(wdwselector, false) in a function which creates the window and you show the window after you add event handler and why don't you move addEventHandlers to the CreateSelectorWindow instead of having them in another function?

setguiviseble=false because it's create gui, but i need to hide it, it's will show if you type SKIN in console or chat.....

addeventhandlers to the CreateSelectorWindow.. i need it?)))

You create the window when you type the command..So what's the point of hiding it if you just created it? Also, indent your code since it's difficult to read it.

Link to comment
Fixed, but anyway it's don't work=(((

How can it be fixed if it's not working? You don't need guiSetVisible at all. Just remove it. In clientSkinSelect you can remove it too and instead use destroyElement. Show your code after you do all the changes.

Link to comment
Fixed, but anyway it's don't work=(((

How can it be fixed if it's not working? You don't need guiSetVisible at all. Just remove it. In clientSkinSelect you can remove it too and instead use destroyElement. Show your code after you do all the changes.

hmmm okay.... [WIP]

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