myPed = createPed(0, -110.8, -1190.30, 2.59) bonbon = guiCreateStaticImage( 400, 400, 75, 75, \"kepek/bonbon.png\", false) myGUIWindow = guiCreateWindow ( 0.25, 0.3, 0.5, 0.5, \"Élelmiszerbolt\", true )guiWindowSetMovable(myGUIWindow, false)guiWindowSetSizable(myGUIWindow, false) bezar = guiCreateButton( 0.88, 0.9, 0.1, 0.05, \"Bezár\", true, myGUIWindow )function ablakclick(button, state, absX, absY, wx, wy, wz, clickedelement) if button == \"left\" and state == \"down\" and clickedelement then local x, y, z = getElementPosition(localPlayer) if (clickedelement == myPed) then if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3 then guiSetVisible(myGUIWindow, true) guiSetVisible(bonbon, true) outputChatBox(\"ablak aktiválva\") end end endendaddEventHandler(\"onClientClick\", root, ablakclick) function bezarclick(button, state, absX, absY, wx, wy, wz, clickedelement) if button == \"left\" and state == \"down\" and clickedelement then local x, y, z = getElementPosition(localPlayer) if (clickedelement == myPed) then if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3 then guiSetVisible(bezar, true) outputChatBox(\"bezár gomb aktiválva\") showCursor ( true ) end end endendaddEventHandler(\"onClientClick\", root, bezarclick) function ablakmutat() guiSetVisible(myGUIWindow, false)endaddEventHandler(\"onClientResourceStart\", getResourceRootElement(getThisResource()), ablakmutat) function bezarmutat() guiSetVisible(bezar, false)endaddEventHandler(\"onClientResourceStart\", getResourceRootElement(getThisResource()), bezarmutat) function bonbonmutat() guiSetVisible(bonbon, false)endaddEventHandler(\"onClientResourceStart\", getResourceRootElement(getThisResource()), bonbonmutat) -------------------------------------------function eltuntet() guiSetVisible(bezar, false)guiSetVisible(myGUIWindow, false)guiSetVisible(bonbon, false)showCursor ( false )endaddEventHandler(\"onClientGUIClick\", bezar, false)