lucascba Posted July 10, 2014 Posted July 10, 2014 Hola, tengo un marker de autos y cuando pasas por el aire(encima del marker) puedes agarrar los autos tambien, como soluciono eso?
Tomas Posted July 10, 2014 Posted July 10, 2014 Debes calcular la altura del 'hiter' y la del marker, si coinciden se ejecute la función, si no coincide nope. Currently developing for International Gaming Community - Join us!
lucascba Posted July 10, 2014 Author Posted July 10, 2014 no entiendo, como hago que este marker no le pase eso? local marker = createMarker( -218.6640625, 1402.982421875, 27.7734375, "Cylinder", 1.8, 0, 69,139,0)
Tomas Posted July 11, 2014 Posted July 11, 2014 Pasame la función donde se ejecuta el onClientMarkerHit u onMarkerHit y ya te lo dejo completo. Currently developing for International Gaming Community - Join us!
lucascba Posted July 12, 2014 Author Posted July 12, 2014 Te lo paso todo local marker = createMarker( -218.6640625, 1402.982421875, 27.7734375, "Cylinder", 1.8, 0, 69,139,0) setElementInterior ( marker, 18 ) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,170,"Militar Team ") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,80,108,35,"Tomar Job",false,windowjob) GUIEditor_Button[3] = guiCreateButton(22,120,108,35,"Sacar Job",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,120,110,36,"Cancelar",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(19,33,273,20,"Precione Tomar job para ser militar.",false,windowjob) function SWATjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWATjob) function SWATjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setArmedForces",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removeArmedForces",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3] , removeTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false)
Bc# Posted July 14, 2014 Posted July 14, 2014 A que te refieres con ¿no le pase eso? PD: Busca en google palabras reservadas para lua, esas son palabras que no puedes usar para definir variables, suerte. Bc Media Clan XPG Foro mtasa://104.223.20.159:21003
Recommended Posts