IceBrasill Posted September 30, 2014 Share Posted September 30, 2014 local myMarker = createMarker(1358.8127441406,1679.6812744141,9.8203125, 'cylinder', 2.0, 255, 0, 0, 150) local myBlip = createBlip( 1358.8127441406,1679.6812744141,9.8203125 ) GUIEditor = { button = {}, window = {} } function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) janela = guiCreateWindow (237, 146, 149, 206, "Aeroporto Las Venturas", false) guiWindowSetSizable(janela, false) guiSetAlpha(janela, 1.00) GUIEditor.button[1] = guiCreateButton(9, 29, 130, 28, "Ilha Perdida", false, janela) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], click1, false ) guiSetFont(GUIEditor.button[1], "default-bold-small") GUIEditor.button[2] = guiCreateButton(9, 72, 130, 28, "New City", false, janela) guiSetFont(GUIEditor.button[2], "default-bold-small") end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) function click1 ( button, p ) guiSetVisible ( janela, false ) showCursor ( false ) setElementPosition ( p, 1, 1, 1 ) end addEventHandler ( "onClientClick", getRootElement(), click1 ) the window is not created upon entering the marker Link to comment
xeon17 Posted September 30, 2014 Share Posted September 30, 2014 Line 19 addEventHandler( "onMarkerHit", myMarker, MarkerHit ) to addEventHandler( "onClientMarkerHit", myMarker, MarkerHit ) Link to comment
IceBrasill Posted September 30, 2014 Author Share Posted September 30, 2014 local myMarker = createMarker(1358.8127441406,1679.6812744141,9.8203125, 'cylinder', 2.0, 255, 0, 0, 150) local myBlip = createBlip( 1358.8127441406,1679.6812744141,9.8203125 ) GUIEditor = { button = {}, window = {} } function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) GUIEditor.window[1] = guiCreateWindow (237, 146, 149, 206, "Aeroporto Las Venturas", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) outputChatBox('Object Created !',255,255,0) GUIEditor.button[1] = guiCreateButton(9, 29, 130, 28, "Ilha Perdida", false, GUIEditor.window[1]) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], click1, false ) guiSetFont(GUIEditor.button[1], "default-bold-small") GUIEditor.button[2] = guiCreateButton(9, 72, 130, 28, "New City", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") showCursor ( true ) end addEventHandler( "onClientMarkerHit", myMarker, MarkerHit ) dont work Link to comment
xeon17 Posted September 30, 2014 Share Posted September 30, 2014 What about /debugscript 3 ? Link to comment
IceBrasill Posted September 30, 2014 Author Share Posted September 30, 2014 attempt to call global 'guiCreateWindow' (a nil value) Link to comment
King12 Posted September 30, 2014 Share Posted September 30, 2014 Client Side addEvent("MarkerHit", true) addEventHandler( "MarkerHit", localPlayer, function () window = guiCreateWindow (237, 146, 149, 206, "Aeroporto Las Venturas", false) guiWindowSetSizable(window, false) guiSetVisible(window, true) outputChatBox('Object Created !',255,255,0) button1 = guiCreateButton(9, 29, 130, 28, "Ilha Perdida", false, window) guiSetFont(button1, "default-bold-small") showCursor ( true ) end end) function click1 () button2 = guiCreateButton(9, 72, 130, 28, "New City", false, window) guiSetFont(button2, "default-bold-small") end addEventHandler ( "onClientGUIClick", button1, click1, true ) Server Side local myMarker = createMarker(1358.8127441406,1679.6812744141,9.8203125, 'cylinder', 2.0, 255, 0, 0, 150) local myBlip = createBlip( 1358.8127441406,1679.6812744141,9.8203125 ) function HitMarker ( hitElement ) if getElementType ( hitElement ) == "player" then triggerClientEvent( source, "MarkerHit", source) else outputChatBox("Get out of the car", hitElement, 255,255,255,true) end end addEventHandler("onMarkerHit", myMarker, HitMarker) Link to comment
Anubhav Posted September 30, 2014 Share Posted September 30, 2014 attempt to call global 'guiCreateWindow' (a nil value) Oh wait that? Are you sure the meta.xml somehow looks like this: <meta> <script src="yourscriptname.lua" type="client" /> </meta> Link to comment
IceBrasill Posted October 1, 2014 Author Share Posted October 1, 2014 dont work, Anubhav and king12 neither functioned .. Link to comment
Anubhav Posted October 1, 2014 Share Posted October 1, 2014 dont work, Anubhav and king12 neither functioned .. Can you tell use /debugscript 3 ? My should work actually. Show us your meta.xml! Link to comment
IceBrasill Posted October 1, 2014 Author Share Posted October 1, 2014 mym eta: type="script" version="1.0.0"> "BASE-SNIPERS.map" dimension="0"> my script: local myMarker = createMarker(1358.8127441406,1679.6812744141,9.8203125, 'cylinder', 2.0, 255, 0, 0, 150) local myBlip = createBlip( 1358.8127441406,1679.6812744141,9.8203125 ) GUIEditor = { button = {}, window = {} } function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) GUIEditor.window[1] = guiCreateWindow (237, 146, 149, 206, "Aeroporto Las Venturas", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) outputChatBox('Object Created !',255,255,0) GUIEditor.button[1] = guiCreateButton(9, 29, 130, 28, "Ilha Perdida", false, GUIEditor.window[1]) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], click1, false ) guiSetFont(GUIEditor.button[1], "default-bold-small") GUIEditor.button[2] = guiCreateButton(9, 72, 130, 28, "New City", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") showCursor ( true ) end addEventHandler( "onClientMarkerHit", myMarker, MarkerHit ) function click1 ( button, p ) guiSetVisible ( janela, false ) showCursor ( false ) setElementPosition ( p, 1, 1, 1 ) end addEventHandler ( "onClientClick", getRootElement(), click1 ) Link to comment
Anubhav Posted October 1, 2014 Share Posted October 1, 2014 local myMarker = createMarker(1358.8127441406,1679.6812744141,9.8203125, 'cylinder', 2.0, 255, 0, 0, 150) local myBlip = createBlip( 1358.8127441406,1679.6812744141,9.8203125 ) GUIEditor = { button = {}, window = {} } function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) GUIEditor.window[1] = guiCreateWindow (237, 146, 149, 206, "Aeroporto Las Venturas", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) outputChatBox('Object Created !',255,255,0) GUIEditor.button[1] = guiCreateButton(9, 29, 130, 28, "Ilha Perdida", false, GUIEditor.window[1]) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], click1, false ) guiSetFont(GUIEditor.button[1], "default-bold-small") GUIEditor.button[2] = guiCreateButton(9, 72, 130, 28, "New City", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") showCursor ( true ) end addEventHandler( "onClientMarkerHit", myMarker, MarkerHit ) function click1 ( button ) guiSetVisible ( janela, false ) showCursor ( false ) setElementPosition ( localPlayer 1, 1, 1 ) end addEventHandler ( "onClientGUIClick", buttonName, click1 ) Link to comment
IceBrasill Posted October 1, 2014 Author Share Posted October 1, 2014 got it, thank you all. 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