TDK Posted August 6, 2010 Posted August 6, 2010 (edited) 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 August 6, 2010 by Guest
DakiLLa Posted August 6, 2010 Posted August 6, 2010 First of all, put your code in [/lua] tags. As I can see addCommandHandler("skin", selectorenable, false, false) you must type /skin to open the window ...
50p Posted August 6, 2010 Posted August 6, 2010 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?
TDK Posted August 6, 2010 Author Posted August 6, 2010 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 но гуи всё равно не пашет..(( токо курсор появляется...
50p Posted August 6, 2010 Posted August 6, 2010 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?
TDK Posted August 6, 2010 Author Posted August 6, 2010 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?)))
50p Posted August 6, 2010 Posted August 6, 2010 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.
50p Posted August 7, 2010 Posted August 7, 2010 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.
TDK Posted August 9, 2010 Author Posted August 9, 2010 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]
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