xXNemesiSXx Posted March 19, 2011 Share Posted March 19, 2011 Sorry for the bad english... i'm italian so... i was trying to create a gui window with guieditor resource, it is very easy! but when i completed my window, i could not save it... so i've made a screen of my gui... http://img121.imageshack.us/i/fazioni.png/ can anyone make it for me ?? don't write the text in the white box, only make the gui without any word, title etc... i will say the real autor of the gui... [ This is a team menu' form my server ] Link to comment
Castillo Posted March 20, 2011 Share Posted March 20, 2011 Guieditor is very easy to use, just make a folder named "guieditor" then make your gui and click on guieditor's menu "print code" - to print it on a gui memo. or "output code" - this will make a .txt (if doesn't exist already) with your GUI code. Link to comment
Moderators Citizen Posted March 20, 2011 Moderators Share Posted March 20, 2011 ... But if you want to "print the code", you have to click on the SCREEN not on a guiElement 1- Right click on the screen 2 - Left click on "Rel/Abs Screen" to print the code in relativ 3 - Right click on the screen again 4 - Left click on "Print Code" 5 - Copy and Paste ( if you select the code with the cursor you do not have to go out of the white frame ! Because you can't copy (Ctrl+C) ) if you want to copy all the code, use Ctrl+A then Copy it ( Ctrl+C ) I make it for you: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"",true) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) For the MTA Logo, you have to copy the image to a folder "images" in YOUR resource folder. Link to comment
xXNemesiSXx Posted March 20, 2011 Author Share Posted March 20, 2011 ... But if you want to "print the code", you have to click on the SCREEN not on a guiElement1- Right click on the screen 2 - Left click on "Rel/Abs Screen" to print the code in relativ 3 - Right click on the screen again 4 - Left click on "Print Code" 5 - Copy and Paste ( if you select the code with the cursor you do not have to go out of the white frame ! Because you can't copy (Ctrl+C) ) if you want to copy all the code, use Ctrl+A then Copy it ( Ctrl+C ) I make it for you: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"",true) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) For the MTA Logo, you have to copy the image to a folder "images" in YOUR resource folder. Thanks a lot !! Guieditor is very easy to use, just make a folder named "guieditor" then make your gui and click on guieditor's menu "print code" - to print it on a gui memo. or "output code" - this will make a .txt (if doesn't exist already) with your GUI code. i know that guieditor is simple to use but yesterday i had a problem... i could not see the print code function in the menu' !! Link to comment
Moderators Citizen Posted March 20, 2011 Moderators Share Posted March 20, 2011 i could not see the print code function in the menu' !! Because... you have to click on the SCREEN not on a guiElement Thanks a lot !! You'r welcome Link to comment
xXNemesiSXx Posted March 20, 2011 Author Share Posted March 20, 2011 i could not see the print code function in the menu' !! Because... you have to click on the SCREEN not on a guiElement Thanks a lot !! You'r welcome i could not see the print code function in the menu' !! Because... you have to click on the SCREEN not on a guiElement Thanks a lot !! You'r welcome but now i have another problem... when i start the resource i can't see the window... this is the script (i also added a skin selector by MasterTobi) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup() GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) addEventHandler("onClientResourceStart",getResourceRootElement(),startup) function visibile() if (guiGetVisible(GUIEditor_Window[1])) then showCursor(false) guiSetVisible(GUIEditor_Window[1],false) else showCursor(true) guiSetVisible(GUIEditor_Window[1],true) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) function warpbasehunters () setElementPosition ( getLocalPlayer(), 40, 40, 40 ) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, false ) function warpbasereaper () setElementPosition ( getLocalPlayer(), 10, 10, 20 ) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, false ) function warpbasestalkers () setElementPosition ( getLocalPlayer(), 0, 0, 0 ) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, false ) function CreateSelectorWindow() wdwselector = guiCreateWindow(0.438,0.880,0.15,0.10,"",true) guiWindowSetMovable(wdwselector,false) btnLeft = guiCreateButton(0.0,0.4,0.200,0.350,"<-",true,wdwselector) btnRight = guiCreateButton(0.76,0.4,0.200,0.350,"->",true,wdwselector) btnSelect = guiCreateButton(0.30,0.4,0.400,0.350,"Seleziona",true,wdwselector) guiSetVisible(wdwselector, false) end function selezionaskin () 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 function clientSkinSelect(button) guiSetVisible(wdwselector, false) guiSetVisible(memo, false) showCursor(false) triggerServerEvent("SkinSelected", getLocalPlayer()) end function clientSkinRight(button) triggerServerEvent("SkinRight", getLocalPlayer()) end function clientSkinLeft(button) triggerServerEvent("SkinLeft", getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) Link to comment
xXNemesiSXx Posted March 20, 2011 Author Share Posted March 20, 2011 Please... help me!! Link to comment
Moderators Citizen Posted March 20, 2011 Moderators Share Posted March 20, 2011 Try this ( you forgot a "end" to close the startup function): GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup() GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) end addEventHandler("onClientResourceStart",getResourceRootElement(),startup) function visibile() if (guiGetVisible(GUIEditor_Window[1])) then showCursor(false) guiSetVisible(GUIEditor_Window[1],false) else showCursor(true) guiSetVisible(GUIEditor_Window[1],true) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) function warpbasehunters () setElementPosition ( getLocalPlayer(), 40, 40, 40 ) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, false ) function warpbasereaper () setElementPosition ( getLocalPlayer(), 10, 10, 20 ) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, false ) function warpbasestalkers () setElementPosition ( getLocalPlayer(), 0, 0, 0 ) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, false ) function CreateSelectorWindow() wdwselector = guiCreateWindow(0.438,0.880,0.15,0.10,"",true) guiWindowSetMovable(wdwselector,false) btnLeft = guiCreateButton(0.0,0.4,0.200,0.350,"<-",true,wdwselector) btnRight = guiCreateButton(0.76,0.4,0.200,0.350,"->",true,wdwselector) btnSelect = guiCreateButton(0.30,0.4,0.400,0.350,"Seleziona",true,wdwselector) guiSetVisible(wdwselector, false) end function selezionaskin () 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 function clientSkinSelect(button) guiSetVisible(wdwselector, false) guiSetVisible(memo, false) showCursor(false) triggerServerEvent("SkinSelected", getLocalPlayer()) end function clientSkinRight(button) triggerServerEvent("SkinRight", getLocalPlayer()) end function clientSkinLeft(button) triggerServerEvent("SkinLeft", getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) Link to comment
xXNemesiSXx Posted March 20, 2011 Author Share Posted March 20, 2011 I will try it ;P Link to comment
xXNemesiSXx Posted March 20, 2011 Author Share Posted March 20, 2011 Ok now i can see the window, but when i click on a button the window won't close and it doesn't spawn me in the coords that i've typed... i'm becoming crazy !! this is the code: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup() GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) end addEventHandler("onClientResourceStart",getResourceRootElement(),startup) function visibile() if (guiGetVisible(GUIEditor_Window[1])) then showCursor(false) guiSetVisible(GUIEditor_Window[1],false) else showCursor(true) guiSetVisible(GUIEditor_Window[1],true) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) function warpbasehunters () setElementPosition ( getLocalPlayer(), 40, 40, 40 ) guiSetVisible(GUIEditor_Window[1],false) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) function warpbasereaper () setElementPosition ( getLocalPlayer(), 10, 10, 20 ) guiSetVisible(GUIEditor_Window[1],false) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) function warpbasestalkers () setElementPosition ( getLocalPlayer(), 0, 0, 0 ) guiSetVisible(GUIEditor_Window[1],false) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) function CreateSelectorWindow() wdwselector = guiCreateWindow(0.438,0.880,0.15,0.10,"",true) guiWindowSetMovable(wdwselector,false) btnLeft = guiCreateButton(0.0,0.4,0.200,0.350,"<-",true,wdwselector) btnRight = guiCreateButton(0.76,0.4,0.200,0.350,"->",true,wdwselector) btnSelect = guiCreateButton(0.30,0.4,0.400,0.350,"Seleziona",true,wdwselector) guiSetVisible(wdwselector, false) end function selezionaskin () 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 function clientSkinSelect(button) guiSetVisible(wdwselector, false) guiSetVisible(memo, false) showCursor(false) triggerServerEvent("SkinSelected", getLocalPlayer()) end function clientSkinRight(button) triggerServerEvent("SkinRight", getLocalPlayer()) end function clientSkinLeft(button) triggerServerEvent("SkinLeft", getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) Link to comment
Castillo Posted March 21, 2011 Share Posted March 21, 2011 Maybe you should say "i'm becoming lazy" GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup() GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) end addEventHandler("onClientResourceStart",getResourceRootElement(),startup) function visibile() if (guiGetVisible(GUIEditor_Window[1])) then showCursor(false) guiSetVisible(GUIEditor_Window[1],false) else showCursor(true) guiSetVisible(GUIEditor_Window[1],true) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) function warpbasehunters () setElementPosition ( getLocalPlayer(), 40, 40, 40 ) guiSetVisible(GUIEditor_Window[1],false) end function warpbasereaper () setElementPosition ( getLocalPlayer(), 10, 10, 20 ) guiSetVisible(GUIEditor_Window[1],false) end function warpbasestalkers () setElementPosition ( getLocalPlayer(), 0, 0, 0 ) guiSetVisible(GUIEditor_Window[1],false) end function CreateSelectorWindow() wdwselector = guiCreateWindow(0.438,0.880,0.15,0.10,"",true) guiWindowSetMovable(wdwselector,false) btnLeft = guiCreateButton(0.0,0.4,0.200,0.350,"<-",true,wdwselector) btnRight = guiCreateButton(0.76,0.4,0.200,0.350,"->",true,wdwselector) btnSelect = guiCreateButton(0.30,0.4,0.400,0.350,"Seleziona",true,wdwselector) guiSetVisible(wdwselector, false) end function selezionaskin () 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 function clientSkinSelect(button) guiSetVisible(wdwselector, false) guiSetVisible(memo, false) showCursor(false) triggerServerEvent("SkinSelected", getLocalPlayer()) end function clientSkinRight(button) triggerServerEvent("SkinRight", getLocalPlayer()) end function clientSkinLeft(button) triggerServerEvent("SkinLeft", getLocalPlayer()) end Link to comment
xXNemesiSXx Posted March 21, 2011 Author Share Posted March 21, 2011 Maybe you should say "i'm becoming lazy" GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup() GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) end addEventHandler("onClientResourceStart",getResourceRootElement(),startup) function visibile() if (guiGetVisible(GUIEditor_Window[1])) then showCursor(false) guiSetVisible(GUIEditor_Window[1],false) else showCursor(true) guiSetVisible(GUIEditor_Window[1],true) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) function warpbasehunters () setElementPosition ( getLocalPlayer(), 40, 40, 40 ) guiSetVisible(GUIEditor_Window[1],false) end function warpbasereaper () setElementPosition ( getLocalPlayer(), 10, 10, 20 ) guiSetVisible(GUIEditor_Window[1],false) end function warpbasestalkers () setElementPosition ( getLocalPlayer(), 0, 0, 0 ) guiSetVisible(GUIEditor_Window[1],false) end function CreateSelectorWindow() wdwselector = guiCreateWindow(0.438,0.880,0.15,0.10,"",true) guiWindowSetMovable(wdwselector,false) btnLeft = guiCreateButton(0.0,0.4,0.200,0.350,"<-",true,wdwselector) btnRight = guiCreateButton(0.76,0.4,0.200,0.350,"->",true,wdwselector) btnSelect = guiCreateButton(0.30,0.4,0.400,0.350,"Seleziona",true,wdwselector) guiSetVisible(wdwselector, false) end function selezionaskin () 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 function clientSkinSelect(button) guiSetVisible(wdwselector, false) guiSetVisible(memo, false) showCursor(false) triggerServerEvent("SkinSelected", getLocalPlayer()) end function clientSkinRight(button) triggerServerEvent("SkinRight", getLocalPlayer()) end function clientSkinLeft(button) triggerServerEvent("SkinLeft", getLocalPlayer()) end HAHA thanks very much...! Link to comment
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