Matevsz Posted April 13, 2015 Share Posted April 13, 2015 Hello, how to do so by typing the text in the gui was displayed on the wall? Link to comment
xXMADEXx Posted April 13, 2015 Share Posted April 13, 2015 What exactly do you mean by trying to put a GUI on a wall? Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 in the text box, type the text in the Gui and when I click button "show" it will show the writing on the wall, how to do something like that? Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 dxDrawText ------ to draw text addCommandHandlerr -- set command for that not sure what you are trying to do Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 In Gui and I have problem, why can not I teleport to the interior ID=17? marker = createMarker(x, y, z) function Teleport(player) if getElementType(player)=="player" then if source == marker then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207, 358.003204) setElementFrozen(player, true) setElementInterior(player, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onClientMarkerHit", marker, Teleport) Link to comment
xXMADEXx Posted April 13, 2015 Share Posted April 13, 2015 Use the getScreenFromWorldPosition function. Example: addEventHandler ( "onClientRender", root, function ( ) local x, y = getScreenFromWorldPosition ( 165, 126, 20 ); if ( x and y ) then dxDrawText ( "165, 126, 20", x, y, 0, 0, tocolor ( 0, 255, 0, 255 ) ); end end ); Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 (edited) and I have problem, why can not I teleport to the interior ID=17? marker = createMarker(x, y, z) function Teleport(player) if getElementType(player)=="player" then if source == marker then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementFrozen(player, true) setElementInterior(player, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onClientMarkerHit", marker, Teleport) try this server side i have change onClientMarkerHit to onMarkerHit marker = createMarker(x, y, z) function Teleport(player) if getElementType(player)=="player" then if source == marker then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementFrozen(player, true) setElementInterior(player, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker, Teleport) Edited April 13, 2015 by Guest Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 how to connect to the GUI Editor.memo[1] and Editor.button GUI [1]? + why can not I teleport to the interior Id= 17? Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 + why can not I teleport to the interior Id= 17? just read your code, it will only send you to interior id 17 but won't change your position. Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 try this marker = createMarker( x, y, z) function Teleport(player) if getElementType(player)=="player" then if source == marker then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) if ( getElementInterior(player) == 0 ) then setElementInterior(player, 17) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end end addEventHandler("onMarkerHit", marker, Teleport) Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 changed to onMarkerHit but not teleport, what else wrong? And how to connect with a button on a 3D text and memo? Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 changed to onMarkerHit but not teleport, what else wrong? just try my code it should work marker = createMarker( x, y, z) function Teleport(player) if getElementType(player)=="player" then if source == marker then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) if ( getElementInterior(player) == 0 ) then setElementInterior(player, 17) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end end addEventHandler("onMarkerHit", marker, Teleport) Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 (edited) are you sure you used it server side? cus it's working fine for me http://imgur.com/qcx9A2Y,OchsX5S and post your full code Edited April 13, 2015 by Guest Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 yes: can you post your full code? Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 marker = createMarker (487.599609375, -0.900390625, 1001.4000244141, "cylinder", 0.60000002) stoldj = createObject (14391, 487.7001953125, -2.7001953125, 1002.299987793, 0, 0, 90) glosnik1 = createObject (2232, 484.29998779297, -5.6999998092651, 1001.700012207, 0, 0, 0) glosnik2 = createObject (2232, 490.20001220703, -5.5999999046326, 1001.700012207, 0, 0, 0) glosnik3 = createObject (2232, 493.29998779297, -13.89999961853, 1002, 0, 0, 272) tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) wyjscie = createMarker (493.39999389648, -24.799999237061, 1001.299987793, "arrow", 1.20000004, 235, 227, 19, 255) wejscie = createMarker (1836.8000488281, -1682.5, 13.89999961853, "arrow", 1.20000004, 235, 227, 19, 255) blip = createBlip (1837.1999511719, -1682.5, 14.199999809265, 48, 2, 255, 0, 0, 255, 0) function AnimacjaTancerek(tance) setPedAnimation (tancerka1, "ped", "dnce_M_b") setPedAnimation (tancerka2, "ped", "dnce_M_e") end function Teleport(player) if getElementType(player)=="player" then if source == marker then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) if ( getElementInterior(player) == 0 ) then setElementInterior(player, 17) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end end addEventHandler("onMarkerHit", marker, Teleport) function DjJob(thePlayer) Dj=createTeam("DJ", 214, 121, 22) local playerName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..PlayerName,aclgetGroup("DJ")) then showCursor(true) guiSetVisible(GUIEditor.window[1], true) GUIEditor = { button = {}, window = {}, label = {}, memo = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(242, 216, 1224, 670, "DjPanel By Matevsz", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(22, 39, 360, 32, "Włącz dym", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(23, 93, 359, 34, "Wyłącz dym", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(23, 179, 359, 32, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(81, 159, 253, 15, "Wpisz tekst, który będzie pokazany na ścianie", false, GUIEditor.window[1]) GUIEditor.browser[1] = guiCreateBrowser(396, 39, 810, 609, "", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(13, 624, 108, 34, "Zamknij", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(91, 228, 222, 29, "Pokaż tekst", false, GUIEditor.window[1]) local theBrowser = guiGetBrowser(GUIEditor.browser[1]) end ) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "https://www.youtube.com") end ) end end function closeGui() if source == Zamknij then showCursor(false) guiSetVisible(GUIEditor.window[1], false) end end addEventHandler("onClientGUIClick", root, closeGui) function WlaczDym() if source == GUIEditor.button[1] then dym = createObject (2780, 489.29998779297, -13.89999961853, 994.20001220703, 0, 0, 0) end end addEventHandler("onClientGUIClick", root, WlaczDym) function WylaczDym() if source == GUIEditor.button[2] then destroyElement(2780) end end addEventHandler("onClientGUIClick", root, WylaczDym) Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 lol you have linked it with the cylinder marker and also few parts of your code is client side and few parts are server side Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 sorry this is not the marker, "wejscie" is the marker, but also corrected does not work addEventHandler ("onMarkerHit", wejscie, Teleport) Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 sorry this is not the marker, "wejscie" is the marker, but also corrected does not work addEventHandler ("onMarkerHit", wejscie, Teleport) contact me via pm , i'll help you. Link to comment
Mr.unpredictable. Posted April 13, 2015 Share Posted April 13, 2015 Server side marker = createMarker (487.599609375, -0.900390625, 1001.4000244141, "cylinder", 0.60000002) stoldj = createObject (14391, 487.7001953125, -2.7001953125, 1002.299987793, 0, 0, 90) marker2 = createMarker (493.39999389648, -24.799999237061, 1001.299987793, "arrow", 1.20000004, 235, 227, 19, 255) marker3 = createMarker (1836.8000488281, -1682.5, 13.89999961853, "arrow", 1.20000004, 235, 227, 19, 255) glosnik1 = createObject (2232, 484.29998779297, -5.6999998092651, 1001.700012207, 0, 0, 0) glosnik2 = createObject (2232, 490.20001220703, -5.5999999046326, 1001.700012207, 0, 0, 0) glosnik3 = createObject (2232, 493.29998779297, -13.89999961853, 1002, 0, 0, 272) tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) blip = createBlip (1837.1999511719, -1682.5, 14.199999809265, 48, 2, 255, 0, 0, 255, 0) function AnimacjaTancerek(tance) setPedAnimation (tancerka1, "ped", "dnce_M_b") setPedAnimation (tancerka2, "ped", "dnce_M_e") end function Teleport(player) if getElementType(player)=="player" then if source == marker3 then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementInterior(player, 17) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker3, Teleport) client ( i didn't check your client side but your server side script should work) GUIEditor = { button = {}, window = {}, label = {}, memo = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(242, 216, 1224, 670, "DjPanel By Matevsz", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(22, 39, 360, 32, "Włącz dym", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(23, 93, 359, 34, "Wyłącz dym", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(23, 179, 359, 32, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(81, 159, 253, 15, "Wpisz tekst, który będzie pokazany na ścianie", false, GUIEditor.window[1]) GUIEditor.browser[1] = guiCreateBrowser(396, 39, 810, 609, "", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(13, 624, 108, 34, "Zamknij", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(91, 228, 222, 29, "Pokaż tekst", false, GUIEditor.window[1]) local theBrowser = guiGetBrowser(GUIEditor.browser[1]) end ) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "http://www.youtube.com") end ) end end function closeGui() if source == Zamknij then showCursor(false) guiSetVisible(GUIEditor.window[1], false) end end addEventHandler("onClientGUIClick", root, closeGui) function WlaczDym() if source == GUIEditor.button[1] then dym = createObject (2780, 489.29998779297, -13.89999961853, 994.20001220703, 0, 0, 0) end end addEventHandler("onClientGUIClick", root, WlaczDym) function WylaczDym() if source == GUIEditor.button[2] then destroyElement(2780) end end addEventHandler("onClientGUIClick", root, WylaczDym) Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 Ok, now how do I see the objects you have set in the interior? And how to make teleport - leave the interior, which is the id of Los Santos? Link to comment
yesyesok Posted April 13, 2015 Share Posted April 13, 2015 Ok, now how do I see the objects you have set in the interior? And how to make teleport - leave the interior, which is the id of Los Santos? Set the object in it interior and what do you mean by los santos Id? if you mean it's interior id then it's 0. Link to comment
Matevsz Posted April 13, 2015 Author Share Posted April 13, 2015 function object(source, object) if (object) then setElementInterior(2232, 17, x, y, z) end doesn't work get out of the interior I have to have some id to Los Stantos, but see the "0" and I'll edit. 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