iFoReX Posted March 31, 2012 Share Posted March 31, 2012 buee estoy asiendo mi primer job recien asiendo la base, pero el ped no me aparece ni el marker de prueba tampoco ;:c porfas ayudenme local x = 685.62610 local y = -2692.39307 local z = 7.5 local x2 = 294.38306 local y2 = -167.90103 local z2 = 1.57813 local market = createMarker ( x, y, z, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( x2 + 2, y2, z2 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = creteMarker ( 1526.51270, -1677.93237, 5.89063, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) setTimer(giveWeapon,1000,1,ped,31,9999,true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer(setElementPosition, 2000, 1, player, x2, y2, z2 ); elseif ( player == localPlayer and source == market2 ) then setTimer(setElementPosition, 2000, 1, player, x + 2, y + 2, z + 2 ); end end ) Link to comment
Arsilex Posted March 31, 2012 Share Posted March 31, 2012 no seria mejor acerlo asi local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = creteMarker ( 1526.51270, -1677.93237, 5.89063, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) setTimer(giveWeapon,1000,1,ped,31,9999,true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer(setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer(setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); end end ) Prueba asi creo que funcionara asi Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 El problema es que la funcion giveWeapon es server-side, y tu script client-side. Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 Sigue sin funcionar man :c local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = creteMarker ( 1526.51270, -1677.93237, 5.89063, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer(setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer(setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); end end ) Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 Pusiste creteMarker, no createMarker. Porque no haces el script server-side? asi podrias darles armas. local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5.89063, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen ( ped, true ) setTimer ( giveWeapon, 1000, 1, ped, 31, 9999, true ) addEventHandler ( 'onMarkerHit', root, function ( player ) if ( source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); end end ) Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 y como puedo aserle con esto ? es que quiero que al entrar al marker osea que sera invisibisible se aga visible este texto ? -- Direct X Drawing addEventHandler("onClientRender",root, function() dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end ) Se que eso es Client como lo ago para unirlo al server-side ? Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5.89063, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then addEventHandler ( "onClientRender", root, drawText ) setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then addEventHandler ( "onClientRender", root, drawText ) setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market ) then removeEventHandler ( "onClientRender", root, drawText ) elseif ( player == localPlayer and source == market2 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 no me aparece man : ... addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); elseif ( player == localPlayer and source == market3 ) then addEventHandler ( "onClientRender", root, drawText ) end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market3 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 Aca funciona perfectamente, cuando voy al marker #3 me aparece el texto, al salir se va. Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 mmm ok :c lo probare nuevamente sigue sin aparecerme man :C Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 Ese no es el marker #3, el que yo digo esta debajo de la estacion de policia en Los Santos. Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 Si, ese, ami me muestra el texto al entrar. Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 a mi no :c como vez no me aparece nada :c aqui te dejo el meta por si algo esta mal "ElMota" version="1.0.0" type="script" name="Skins" description="" showInResourceBrowser="true" /> y el script : local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5.89063, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then addEventHandler ( "onClientRender", root, drawText ) setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then addEventHandler ( "onClientRender", root, drawText ) setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market ) then removeEventHandler ( "onClientRender", root, drawText ) elseif ( player == localPlayer and source == market2 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 Pues eso es porque el script es client-side, no server side. "ElMota" version="1.0.0" type="script" name="Skins" description="" showInResourceBrowser="true" /> Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 Como le ago para que el grid aparesca apretando enter pero solo si esta en el marker osea si no esta en el marker y aprieta enter no aparece el gridlist GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(258,160,294,357,false) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Camion Polis") guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Auto Polis") local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); elseif ( player == localPlayer and source == market3 ) then addEventHandler ( "onClientRender", root, drawText ) end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market3 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(258,160,294,357,false) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Camion Polis") guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Auto Polis") local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); elseif ( player == localPlayer and source == market3 ) then addEventHandler ( "onClientRender", root, drawText ) end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market3 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) bindKey ( "enter", "down", function ( ) if ( isElementWithinMarker ( localPlayer, market3 ) ) then guiSetVisible ( GUIEditor_Grid[1], true ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 solid ise esto : GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(258,160,294,357,false) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end local grid1 = guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Camion Polis") local grid2 = guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Auto Polis") addEventHandler("onClientDoubleClick", root, function () if ( source == grid1 ) then createVehicle ( 427, x, y, z ) guiSetVisible( GUIEditor_Grid[1], false ) elseif ( source == grid2 ) then createVehicle ( 596, x, y, z ) guiSetVisible( GUIEditor_Grid[1], false ) end end bindKey ( "enter", "down", function ( ) if ( isElementWithinMarker ( localPlayer, market3 ) ) then guiSetVisible ( GUIEditor_Grid[1], true ) end end ) local x = 1540.95654 local y = -1687.67078 local z = 5.89063 local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); elseif ( player == localPlayer and source == market3 ) then addEventHandler ( "onClientRender", root, drawText ) end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market3 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Pero ahora no me aparece el marker ni nada del script que anda mal ? Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 local x = 1540.95654 local y = -1687.67078 local z = 5.89063 local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(258,160,294,357,false) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end local grid1 = guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Camion Polis") local grid2 = guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Auto Polis") addEventHandler("onClientDoubleClick", root, function ( ) if ( source == grid1 ) then createVehicle ( 427, x, y, z ) guiSetVisible( GUIEditor_Grid[1], false ) elseif ( source == grid2 ) then createVehicle ( 596, x, y, z ) guiSetVisible( GUIEditor_Grid[1], false ) end end ) -- Te falto el parentesis. bindKey ( "enter", "down", function ( ) if ( isElementWithinMarker ( localPlayer, market3 ) ) then guiSetVisible ( GUIEditor_Grid[1], true ) end end ) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); elseif ( player == localPlayer and source == market3 ) then addEventHandler ( "onClientRender", root, drawText ) end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market3 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 si man ahora aparece pero aparece el gridlist cuando se inicia el script , no al apretar enter Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 Usa guiSetVisible para ocultarla al crearse, es algo muy facil, podes hacerlo solo. Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 Listo man ya lo ise pero 1 problem cuando presiono enter en el marker no aparecen los items local x = 1540.95654 local y = -1687.67078 local z = 5.89063 local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(258,160,294,357,false) guiSetVisible( GUIEditor_Grid[1], false ) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end local grid1 = guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Camion Polis") local grid2 = guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Auto Polis") addEventHandler("onClientDoubleClick", root, function ( ) if ( source == grid1 ) then createVehicle ( 427, x, y, z ) guiSetVisible( GUIEditor_Grid[1], false ) elseif ( source == grid2 ) then createVehicle ( 596, x, y, z ) guiSetVisible( GUIEditor_Grid[1], false ) end end ) -- Te falto el parentesis. bindKey ( "enter", "down", function ( ) if ( isElementWithinMarker ( localPlayer, market3 ) ) then guiSetVisible ( GUIEditor_Grid[1], true ) end end ) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); elseif ( player == localPlayer and source == market3 ) then addEventHandler ( "onClientRender", root, drawText ) end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market3 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 local x = 1540.95654 local y = -1687.67078 local z = 5.89063 local market = createMarker ( 685.62610, -2692.39307, 7.5, "cylinder", 1.5, 0, 0, 255, 170 ) local market2 = createMarker ( 294.38306 + 2, -167.90103, 1.57813 - 1, "cylinder", 1.5, 0, 0, 255, 170 ) local market3 = createMarker ( 1526.51270, -1677.93237, 5, "cylinder", 1.5, 0, 0, 255, 170 ) local ped = createPed ( 286, 1525.26294, -1677.85596, 5.89063, 270 ) setElementFrozen(ped, true) GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(258,160,294,357,false) guiSetVisible( GUIEditor_Grid[1], false ) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.50) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Camion Polis",false,false) guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Auto Polis",false,false) addEventHandler("onClientGUIDoubleClick", root, function ( ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then if ( row == 0 ) then createVehicle ( 427, x, y, z ) elseif ( row == 1 ) then createVehicle ( 596, x, y, z ) end guiSetVisible( GUIEditor_Grid[1], false ) end end end ) -- Te falto el parentesis. bindKey ( "enter", "down", function ( ) if ( isElementWithinMarker ( localPlayer, market3 ) ) then guiSetVisible ( GUIEditor_Grid[1], true ) end end ) addEventHandler ( 'onClientMarkerHit', root, function ( player ) if ( player == localPlayer and source == market ) then setTimer ( setElementPosition, 2000, 1, player, 294.38306, -167.90103, 1.57813 ); elseif ( player == localPlayer and source == market2 ) then setTimer ( setElementPosition, 2000, 1, player, 685.62610 + 2, -2692.39307 + 2, 7.5 + 2 ); elseif ( player == localPlayer and source == market3 ) then addEventHandler ( "onClientRender", root, drawText ) end end ) addEventHandler ( 'onClientMarkerLeave', root, function ( player ) if ( player == localPlayer and source == market3 ) then removeEventHandler ( "onClientRender", root, drawText ) end end ) function drawText ( ) dxDrawText("Press Enter for do the job",458.0,295.0,631.0,317.0,tocolor(255,0,0,170),1.2,"default","left","top",false,false,false) end Link to comment
iFoReX Posted March 31, 2012 Author Share Posted March 31, 2012 como podria agregarle un market corona arriba del auto que se creara ? Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 createMarker + attachElements. Link to comment
Recommended Posts