andrex123 Posted January 30, 2012 Share Posted January 30, 2012 rutals1 = createMarker(1528.76953125, -2593.37109375, 13.546875, 'cylinder', 5, 255, 0, 0, 100) function rutalss(thePlayer, matchingDimension) local coche = getPedOccupiedVehicle ( thePlayer ) if isElementWithinMarker(thePlayer, rutals1) then GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(193,57,424,513,"Panel de rutas.",false) GUIEditor_Image[1] = guiCreateStaticImage(85,35,263,104,"images/avion.png",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(102,144,216,68,"\n Bienvenido al panel de rutas.! Selecciona la ruta que deseas.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(249,227,154,37,"LS - LV",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(41,227,157,35,"LV - LS",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(44,278,153,36,"LS - SF",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(248,279,154,41,"SF - LS",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(41,330,155,37,"SF - LV",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(248,336,143,41,"LV - SF",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(146,458,158,38,"Tu posicion:",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(152,393,158,31,"Tu avion: " coche ,false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(388,483,27,21,"X",false,GUIEditor_Window[1]) else outputChatBox("No estas en un lugar para reparar el coche/avion.!", thePlayer, 255, 0, 0) end end addCommandHandler("ruta", rutalss) Esta usando el isElementWithinMarker pero estoy en el marker pero me dice que no lo estoy Link to comment
Castillo Posted January 30, 2012 Share Posted January 30, 2012 rutals1 = createMarker(1528.76953125, -2593.37109375, 13.546875, 'cylinder', 5, 255, 0, 0, 100) function rutalss() local coche = getPedOccupiedVehicle ( localPlayer ) if isElementWithinMarker(localPlayer, rutals1) then GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(193,57,424,513,"Panel de rutas.",false) GUIEditor_Image[1] = guiCreateStaticImage(85,35,263,104,"images/avion.png",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(102,144,216,68,"\n Bienvenido al panel de rutas.! Selecciona la ruta que deseas.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(249,227,154,37,"LS - LV",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(41,227,157,35,"LV - LS",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(44,278,153,36,"LS - SF",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(248,279,154,41,"SF - LS",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(41,330,155,37,"SF - LV",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(248,336,143,41,"LV - SF",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(146,458,158,38,"Tu posicion:",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(152,393,158,31,"Tu avion: ".. coche and getVehicleName(coche) or "Ninguno.",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(388,483,27,21,"X",false,GUIEditor_Window[1]) else outputChatBox("No estas en un lugar para reparar el coche/avion.!", 255, 0, 0) end end addCommandHandler("ruta", rutalss) Me imagino que esto es client side, verdad? porque GUI es solo client side. Link to comment
andrex123 Posted January 30, 2012 Author Share Posted January 30, 2012 sisi esta en clien side eso lo aprendi de la wiki que estaba mal? Link to comment
Castillo Posted January 30, 2012 Share Posted January 30, 2012 La funcion addCommandHandler en client side no tiene el argumento del jugador, tenes que usar localPlayer. Ademas, no estabas usando bien la variable "coche". Link to comment
Recommended Posts