NotAvailable Posted January 20, 2011 Share Posted January 20, 2011 Hi, I have a little problem with my Travel GUI. When i open the travel GUI, And i click travel. I will be teleported to the specified town. But when i stand in a marker the GUI wont pop-up. How can i fix this? heres the code(CLIENT): travelMarker = createMarker(2144.1611328125, 1628.5504150391, 993.57611083984, "Cylinder", 1.5, 0, 255, 0, 140) function wastedGui() showCursor(true) GUIEditor_Label = {} spawnWindow = guiCreateWindow(276,180,253,277,"Travel",false) guiWindowSetMovable(spawnWindow,false) guiWindowSetSizable(spawnWindow,false) mehicoSpawn = guiCreateButton(146,55,88,24,"Spawn",false,spawnWindow) addEventHandler("onClientGUIClick", mehicoSpawn, warptoMehico, false) GUIEditor_Label[1] = guiCreateLabel(13,55,73,13,"Little Mehico",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) racoonSpawn = guiCreateButton(146,111,88,24,"Spawn", false,spawnWindow) addEventHandler("onClientGUIClick", racoonSpawn, warptoRacoon, false) GUIEditor_Label[2] = guiCreateLabel(13,111,79,20,"Racoon Town",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(13,171,79,15,"Mercy",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) mercySpawn = guiCreateButton(146,171,88,24,"Spawn",false,spawnWindow) addEventHandler("onClientGUIClick", mercySpawn, warptoMercy, false) GUIEditor_Label[4] = guiCreateLabel(7,36,243,19,"_______________________________________",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[4],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(7,190,243,20,"_______________________________________",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[5],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) GUIEditor_Label[6] = guiCreateLabel(27,28,194,17,"Choose where you want to travel to.",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[6],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[6],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false) GUIEditor_Label[7] = guiCreateLabel(13,255,184,15,"European Zombie Virus, All rights reserved.",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[7],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[7],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[7],"left",false) guiSetFont(GUIEditor_Label[7],"default-small") end addEventHandler("onClientMarkerHit", travelMarker, wastedGui) function warptoRacoon() jij = getLocalPlayer() setElementPosition(jij, -1964.1522216797, 137.70756530762, 9.5, 0 ) setElementRotation(jij, 0, 0, 92.309692382813) setElementInterior (jij, 0 ) setElementHealth(jij, 100) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMehico() jij = getLocalPlayer() setElementPosition(jij, -169.74603271484, 1118.3814697266, 27.694049835205, 0 ) setElementRotation(jij, 0, 0, 358.806640625) setElementHealth(jij, 100) setElementInterior (jij, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMercy() jij = getLocalPlayer() setElementPosition(jij, 1184.7172851563, -1323.6173095703, 13.573800086975, 0 ) setElementRotation(jij, 0, 0, 270.24758911133) setElementHealth(jij, 100) setElementInterior (jij, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end Regards, Jesseunit Link to comment
Kenix Posted January 20, 2011 Share Posted January 20, 2011 Hi,I have a little problem with my Travel GUI. When i open the travel GUI, And i click travel. I will be teleported to the specified town. But when i stand in a marker the GUI wont pop-up. How can i fix this? heres the code(CLIENT): travelMarker = createMarker(2144.1611328125, 1628.5504150391, 993.57611083984, "Cylinder", 1.5, 0, 255, 0, 140) function wastedGui() showCursor(true) GUIEditor_Label = {} spawnWindow = guiCreateWindow(276,180,253,277,"Travel",false) guiWindowSetMovable(spawnWindow,false) guiWindowSetSizable(spawnWindow,false) mehicoSpawn = guiCreateButton(146,55,88,24,"Spawn",false,spawnWindow) addEventHandler("onClientGUIClick", mehicoSpawn, warptoMehico, false) GUIEditor_Label[1] = guiCreateLabel(13,55,73,13,"Little Mehico",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) racoonSpawn = guiCreateButton(146,111,88,24,"Spawn", false,spawnWindow) addEventHandler("onClientGUIClick", racoonSpawn, warptoRacoon, false) GUIEditor_Label[2] = guiCreateLabel(13,111,79,20,"Racoon Town",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(13,171,79,15,"Mercy",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) mercySpawn = guiCreateButton(146,171,88,24,"Spawn",false,spawnWindow) addEventHandler("onClientGUIClick", mercySpawn, warptoMercy, false) GUIEditor_Label[4] = guiCreateLabel(7,36,243,19,"_______________________________________",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[4],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(7,190,243,20,"_______________________________________",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[5],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) GUIEditor_Label[6] = guiCreateLabel(27,28,194,17,"Choose where you want to travel to.",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[6],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[6],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false) GUIEditor_Label[7] = guiCreateLabel(13,255,184,15,"European Zombie Virus, All rights reserved.",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[7],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[7],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[7],"left",false) guiSetFont(GUIEditor_Label[7],"default-small") end addEventHandler("onClientMarkerHit", travelMarker, wastedGui) function warptoRacoon() jij = getLocalPlayer() setElementPosition(jij, -1964.1522216797, 137.70756530762, 9.5, 0 ) setElementRotation(jij, 0, 0, 92.309692382813) setElementInterior (jij, 0 ) setElementHealth(jij, 100) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMehico() jij = getLocalPlayer() setElementPosition(jij, -169.74603271484, 1118.3814697266, 27.694049835205, 0 ) setElementRotation(jij, 0, 0, 358.806640625) setElementHealth(jij, 100) setElementInterior (jij, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMercy() jij = getLocalPlayer() setElementPosition(jij, 1184.7172851563, -1323.6173095703, 13.573800086975, 0 ) setElementRotation(jij, 0, 0, 270.24758911133) setElementHealth(jij, 100) setElementInterior (jij, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end Regards, Jesseunit jij - should not be repeated in all the spawn. i fix it function warptoRacoon() j1 = getLocalPlayer() setElementPosition(j1, -1964.1522216797, 137.70756530762, 9.5, 0 ) setElementRotation(j1, 0, 0, 92.309692382813) setElementInterior (j1, 0 ) setElementHealth(j1, 100) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMehico() j2 = getLocalPlayer() setElementPosition(j2, -169.74603271484, 1118.3814697266, 27.694049835205, 0 ) setElementRotation(j2, 0, 0, 358.806640625) setElementHealth(j2, 100) setElementInterior (j2, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMercy() j3 = getLocalPlayer() setElementPosition(j3, 1184.7172851563, -1323.6173095703, 13.573800086975, 0 ) setElementRotation(j3, 0, 0, 270.24758911133) setElementHealth(j3, 100) setElementInterior (j3, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end edit and use degugscript command console: /debugscript 1-3 Link to comment
MaddDogg Posted January 20, 2011 Share Posted January 20, 2011 You should also negate the propagation of the attached handler, otherwise it will be called, if you enter any marker. Link to comment
NotAvailable Posted January 20, 2011 Author Share Posted January 20, 2011 Hmmm.... Its still not working. code: travelMarker = createMarker(2144.1611328125, 1628.5504150391, 993.57611083984, "Cylinder", 1.5, 0, 255, 0, 140) function wastedGui() showCursor(true) GUIEditor_Label = {} spawnWindow = guiCreateWindow(276,180,253,277,"Travel",false) guiWindowSetMovable(spawnWindow,false) guiWindowSetSizable(spawnWindow,false) mehicoSpawn = guiCreateButton(146,55,88,24,"Spawn",false,spawnWindow) addEventHandler("onClientGUIClick", mehicoSpawn, warptoMehico, false) GUIEditor_Label[1] = guiCreateLabel(13,55,73,13,"Little Mehico",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) racoonSpawn = guiCreateButton(146,111,88,24,"Spawn", false,spawnWindow) addEventHandler("onClientGUIClick", racoonSpawn, warptoRacoon, false) GUIEditor_Label[2] = guiCreateLabel(13,111,79,20,"Racoon Town",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(13,171,79,15,"Mercy",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) mercySpawn = guiCreateButton(146,171,88,24,"Spawn",false,spawnWindow) addEventHandler("onClientGUIClick", mercySpawn, warptoMercy, false) GUIEditor_Label[4] = guiCreateLabel(7,36,243,19,"_______________________________________",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[4],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(7,190,243,20,"_______________________________________",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[5],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) GUIEditor_Label[6] = guiCreateLabel(27,28,194,17,"Choose where you want to travel to.",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[6],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[6],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false) GUIEditor_Label[7] = guiCreateLabel(13,255,184,15,"European Zombie Virus, All rights reserved.",false,spawnWindow) guiLabelSetColor(GUIEditor_Label[7],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[7],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[7],"left",false) guiSetFont(GUIEditor_Label[7],"default-small") end addEventHandler("onClientMarkerHit", travelMarker, wastedGui) function warptoRacoon() j1 = getLocalPlayer() setElementPosition(j1, -1964.1522216797, 137.70756530762, 9.5, 0 ) setElementRotation(j1, 0, 0, 92.309692382813) setElementInterior (j1, 0 ) setElementHealth(j1, 100) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMehico() j2 = getLocalPlayer() setElementPosition(j2, -169.74603271484, 1118.3814697266, 27.694049835205, 0 ) setElementRotation(j2, 0, 0, 358.806640625) setElementHealth(j2, 100) setElementInterior (j2, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end function warptoMercy() j3 = getLocalPlayer() setElementPosition(j3, 1184.7172851563, -1323.6173095703, 13.573800086975, 0 ) setElementRotation(j3, 0, 0, 270.24758911133) setElementHealth(j3, 100) setElementInterior (j3, 0 ) guiSetVisible(spawnWindow, false) showCursor(false) end Link to comment
NotAvailable Posted January 20, 2011 Author Share Posted January 20, 2011 Hmmm.... I can teleport. Maybe i need to make it server side? Link to comment
Kenix Posted January 20, 2011 Share Posted January 20, 2011 Hmmm.... I can teleport.Maybe i need to make it server side? more teleports scripts created server side Link to comment
NotAvailable Posted January 20, 2011 Author Share Posted January 20, 2011 So i need to make it server side? Link to comment
Castillo Posted January 20, 2011 Share Posted January 20, 2011 What doesn't work with it? i tryied it and it let's me teleport to those locations. Link to comment
NotAvailable Posted January 20, 2011 Author Share Posted January 20, 2011 What doesn't work with it? i tryied it and it let's me teleport to those locations. Thats all fine. But when i teleport. And i go into the weaponshop marker. The GUI wont open,. Link to comment
Castillo Posted January 20, 2011 Share Posted January 20, 2011 Why is that? you got the same arguments for the windows or something like that? Link to comment
NotAvailable Posted January 20, 2011 Author Share Posted January 20, 2011 Why is that? you got the same arguments for the windows or something like that? Nope, Its when i teleport the the town. There are shops and all that stuff.... So when i go in the shop marker. The shop wont open. When im not teleported and i enter the marker the marker works. Link to comment
NotAvailable Posted January 21, 2011 Author Share Posted January 21, 2011 Ok. I tried another teleport resource. But the same happens again. Even the gate wont open for me. Link to comment
NotAvailable Posted January 23, 2011 Author Share Posted January 23, 2011 I've tried to fix it again, Even the zombies wont attack me. Its like im invicible. 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