MatXpl Posted May 31, 2010 Posted May 31, 2010 I'm create gui and i don't know how to view this on marker hit. Please help ! MTA:SA scripts/gamemodes/misc: http://www.mtasa.xn.pl
Moderators Zango Posted May 31, 2010 Moderators Posted May 31, 2010 marker1 = createMarker ( X, Y, Z, "cylinder", 1, 255, 255, 0, 170 ) -- your marker code goes here function enterMarker(hitPlayer) if hitPlayer == getLocalPlayer() then guiSetVisible (yourGUIelement, true) -- replace "yourGUIelement" with the name of your GUI window. end end addEventHandler ( "onClientMarkerHit", marker1, enterMarker) hitPlayer == getLocalPlayer() verifies that it is a valid player, and if it is, it calls the GUI.
MatXpl Posted June 26, 2010 Author Posted June 26, 2010 -- G.U.I. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Progress = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.0156,0.2666,0.2539,0.3008,"Telefon - Play K796J",true) GUIEditor_Label[1] = guiCreateLabel(14,28,149,20,"Kontakty",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Button[1] = guiCreateButton(11,53,53,22,"PD",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(64,53,53,22,"Policja",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(117,53,53,22,"Taxi",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(170,53,53,22,"Szpital",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,85,188,16,"Anulowanie Publicznych serwisow",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Button[5] = guiCreateButton(11,111,53,22,"PD",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(64,111,53,22,"Policja",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(117,111,53,22,"Taxi",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(170,111,53,22,"Szpital",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(223,53,75,22,"Administracja",false,GUIEditor_Window[1]) GUIEditor_Button[10] = guiCreateButton(228,111,70,22,"Administracja",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(13,143,150,17,"Znajomi:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) GUIEditor_Button[11] = guiCreateButton(11,164,64,32,"Zwolaj impreze!",false,GUIEditor_Window[1]) GUIEditor_Button[12] = guiCreateButton(234,164,64,32,"Zakoncz impreze",false,GUIEditor_Window[1]) GUIEditor_Button[13] = guiCreateButton(14,217,34,19,"1",false,GUIEditor_Window[1]) GUIEditor_Button[14] = guiCreateButton(48,217,34,19,"2",false,GUIEditor_Window[1]) GUIEditor_Button[15] = guiCreateButton(82,217,34,19,"3",false,GUIEditor_Window[1]) GUIEditor_Button[16] = guiCreateButton(116,217,34,19,"4",false,GUIEditor_Window[1]) GUIEditor_Button[17] = guiCreateButton(150,217,34,19,"5",false,GUIEditor_Window[1]) GUIEditor_Button[18] = guiCreateButton(184,217,34,19,"6",false,GUIEditor_Window[1]) GUIEditor_Button[19] = guiCreateButton(218,217,34,19,"7",false,GUIEditor_Window[1]) GUIEditor_Button[20] = guiCreateButton(252,217,34,19,"8",false,GUIEditor_Window[1]) GUIEditor_Button[21] = guiCreateButton(286,217,30,19,"9",false,GUIEditor_Window[1]) GUIEditor_Button[22] = guiCreateButton(117,236,34,19,"*",false,GUIEditor_Window[1]) GUIEditor_Button[23] = guiCreateButton(151,236,34,19,"0",false,GUIEditor_Window[1]) GUIEditor_Button[24] = guiCreateButton(189,236,34,19,"#",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(77,167,155,30,"",false,GUIEditor_Window[1]) GUIEditor_Progress[1] = guiCreateProgressBar(218,30,81,18,false,GUIEditor_Window[1]) guiProgressBarSetProgress(GUIEditor_Progress[1],85) GUIEditor_Label[4] = guiCreateLabel(167,32,48,16,"Bateria:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Grid[1] = guiCreateGridList(0.5211,0.6016,0.0039,0.0049,true) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) -- functions... function enterMarker1(hitPlayer) if hitPlayer == getLocalPlayer() then guiSetVisible (GUIEditor_Window[1], true) -- replace "yourGUIelement" with the name of your GUI window. end end addEventHandler ( "onClientMarkerHit", s1, enterMarker1) 1 error pls help !: at tempt to call global 'GuiCreateWindow' MTA:SA scripts/gamemodes/misc: http://www.mtasa.xn.pl
50p Posted June 26, 2010 Posted June 26, 2010 There is guiCreateWindow but no GuiCreateWindow which I can't see in your code. Lua is case-sensitive language and all MTA function names start with lower case letters. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
MatXpl Posted June 29, 2010 Author Posted June 29, 2010 -- G.U.I. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Progress = {} GUIEditor_Grid = {} GUIEditor_Window[1] = GuiCreateWindow(0.0156,0.2666,0.2539,0.3008,"Telefon - Play K796J",true) GUIEditor_Label[1] = GuiCreateLabel(14,28,149,20,"Kontakty",false,GUIEditor_Window[1]) GuiLabelSetColor(GUIEditor_Label[1],255,255,255) GuiLabelSetVerticalAlign(GUIEditor_Label[1],"top") GuiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Button[1] = GuiCreateButton(11,53,53,22,"PD",false,GUIEditor_Window[1]) GUIEditor_Button[2] = GuiCreateButton(64,53,53,22,"Policja",false,GUIEditor_Window[1]) GUIEditor_Button[3] = GuiCreateButton(117,53,53,22,"Taxi",false,GUIEditor_Window[1]) GUIEditor_Button[4] = GuiCreateButton(170,53,53,22,"Szpital",false,GUIEditor_Window[1]) GUIEditor_Label[2] = GuiCreateLabel(11,85,188,16,"Anulowanie Publicznych serwisow",false,GUIEditor_Window[1]) GuiLabelSetColor(GUIEditor_Label[2],255,255,255) GuiLabelSetVerticalAlign(GUIEditor_Label[2],"top") GuiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Button[5] = GuiCreateButton(11,111,53,22,"PD",false,GUIEditor_Window[1]) GUIEditor_Button[6] = GuiCreateButton(64,111,53,22,"Policja",false,GUIEditor_Window[1]) GUIEditor_Button[7] = GuiCreateButton(117,111,53,22,"Taxi",false,GUIEditor_Window[1]) GUIEditor_Button[8] = GuiCreateButton(170,111,53,22,"Szpital",false,GUIEditor_Window[1]) GUIEditor_Button[9] = GuiCreateButton(223,53,75,22,"Administracja",false,GUIEditor_Window[1]) GUIEditor_Button[10] = GuiCreateButton(228,111,70,22,"Administracja",false,GUIEditor_Window[1]) GUIEditor_Label[3] = GuiCreateLabel(13,143,150,17,"Znajomi:",false,GUIEditor_Window[1]) GuiLabelSetColor(GUIEditor_Label[3],255,255,255) GuiLabelSetVerticalAlign(GUIEditor_Label[3],"top") GuiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) GUIEditor_Button[11] = GuiCreateButton(11,164,64,32,"Zwolaj impreze!",false,GUIEditor_Window[1]) GUIEditor_Button[12] = GuiCreateButton(234,164,64,32,"Zakoncz impreze",false,GUIEditor_Window[1]) GUIEditor_Button[13] = GuiCreateButton(14,217,34,19,"1",false,GUIEditor_Window[1]) GUIEditor_Button[14] = GuiCreateButton(48,217,34,19,"2",false,GUIEditor_Window[1]) GUIEditor_Button[15] = GuiCreateButton(82,217,34,19,"3",false,GUIEditor_Window[1]) GUIEditor_Button[16] = GuiCreateButton(116,217,34,19,"4",false,GUIEditor_Window[1]) GUIEditor_Button[17] = GuiCreateButton(150,217,34,19,"5",false,GUIEditor_Window[1]) GUIEditor_Button[18] = GuiCreateButton(184,217,34,19,"6",false,GUIEditor_Window[1]) GUIEditor_Button[19] = GuiCreateButton(218,217,34,19,"7",false,GUIEditor_Window[1]) GUIEditor_Button[20] = GuiCreateButton(252,217,34,19,"8",false,GUIEditor_Window[1]) GUIEditor_Button[21] = GuiCreateButton(286,217,30,19,"9",false,GUIEditor_Window[1]) GUIEditor_Button[22] = GuiCreateButton(117,236,34,19,"*",false,GUIEditor_Window[1]) GUIEditor_Button[23] = GuiCreateButton(151,236,34,19,"0",false,GUIEditor_Window[1]) GUIEditor_Button[24] = GuiCreateButton(189,236,34,19,"#",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = GuiCreateEdit(77,167,155,30,"",false,GUIEditor_Window[1]) GUIEditor_Progress[1] = GuiCreateProgressBar(218,30,81,18,false,GUIEditor_Window[1]) GuiProgressBarSetProgress(GUIEditor_Progress[1],85) GUIEditor_Label[4] = GuiCreateLabel(167,32,48,16,"Bateria:",false,GUIEditor_Window[1]) GuiLabelSetColor(GUIEditor_Label[4],255,255,255) GuiLabelSetVerticalAlign(GUIEditor_Label[4],"top") GuiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Grid[1] = GuiCreateGridList(0.5211,0.6016,0.0039,0.0049,true) GuiGridListSetSelectionMode(GUIEditor_Grid[1],2) Error are back ! MTA:SA scripts/gamemodes/misc: http://www.mtasa.xn.pl
50p Posted June 29, 2010 Posted June 29, 2010 ... Lua is case-sensitive language and all MTA function names start with LOWER CASE letters. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
TheRealCow Posted July 2, 2010 Posted July 2, 2010 lol, fail Server Name: mR|Team Clan Race Server Server IP: 84.82.81.225:22004
dzek (varez) Posted July 2, 2010 Posted July 2, 2010 are you sure that was a good reason to bumping this? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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