Bean666 Posted January 2, 2015 Share Posted January 2, 2015 hi , how can i make this appear when i hit a marker. any help appreciated. NOTE: I have already created my own marker local marker = createMarker( 203.68948364258, 1913.0572509766, 17.640625, "Cylinder", 2, 6, 240, 226, 255) GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(428, 169, 485, 449, "Survivors", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(148, 307, 194, 57, "Choose", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(9, 24, 466, 247, "Survivors.... Allied With Military , if you choose this side , you will be spawned to the Military & Survivors Base. and there is no going back. and as a survivor , you will need to survive and explore san andreas while killing zombies and surviving for better experience.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) end ) Link to comment
roaddog Posted January 2, 2015 Share Posted January 2, 2015 local marker = createMarker( 203.68948364258, 1913.0572509766, 17.640625, "Cylinder", 2, 6, 240, 226, 255) GUIEditor = { button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(428, 169, 485, 449, "Survivors", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(148, 307, 194, 57, "Choose", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(9, 24, 466, 247, "Survivors.... Allied With Military , if you choose this side , you will be spawned to the Military & Survivors Base. and there is no going back. and as a survivor , you will need to survive and explore san andreas while killing zombies and surviving for better experience.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) addEventHandler("onClientMarkerHit", marker, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) end end) Simple as that. You need an onClientMarkerHit event to trigger it, and then set visible of window. Link to comment
LaCosTa Posted January 2, 2015 Share Posted January 2, 2015 local marker = createMarker( 203.68948364258, 1913.0572509766, 17.640625, "Cylinder", 2, 6, 240, 226, 255) GUIEditor = { button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(428, 169, 485, 449, "Survivors", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(148, 307, 194, 57, "Choose", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(9, 24, 466, 247, "Survivors.... Allied With Military , if you choose this side , you will be spawned to the Military & Survivors Base. and there is no going back. and as a survivor , you will need to survive and explore san andreas while killing zombies and surviving for better experience.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) addEventHandler("onClientMarkerHit", marker, function(hitElement) if ((getElementType(hitElement) == "player") and not isPedInVehicle(hitElement)) then if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end end ) 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