Jump to content

alex17"

Members
  • Posts

    163
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by alex17"

  1. eso solo funcionara bien si el script esta en el lado cliente, pero si esta en el lado cliente los demás no verán el cambio de skin lo mas correcto seria hacerlo de esta manera en el lado server local oldskin = []; addCommandHandler("sexy", function() oldskin[l_74_0] = getElementModel(l_74_0); setElementModel(l_74_0, 241); setPedAnimation(l_74_0, "STRIP", "STR_loop_B", -1, true, false, false); setTimer(function(ped) setElementModel(ped, oldskin[ped]); setPedAnimation(ped); oldskin[l_74_0] = false; end, 20000, 1, l_74_0); end
  2. mm te dejo un ejemplo trate de hacerlo lo mas facil posible para que puedas entenderlo local scroll = 0 editbox = { {"prueba 1"} {"prueba 2"} {"prueba 3"} {"prueba 4"} {"prueba 5"} {"prueba 6"} {"prueba 7"} {"prueba 8"} {"prueba 9"} {"prueba 10"} } function dx_editbox() ------ scrollbar if #editbox > 5 then local rec = (scroll * 240) / (#editbox - 5) dxDrawRectangle(610, 300, 20, 300, tocolor(0, 0, 0)) dxDrawRectangle(610, 300 + rec, 20, 60, tocolor(255, 255, 255)) end ------ editbox local cache = 0 for i = 1 + scroll, 5 + scroll do if editbox[i] then if isMouseInPosition(400, 300 + cache, 200, 60) or currentedit == i then dxDrawRectangle(400, 300 + cache, 200, 60, tocolor(255, 255, 255)) dxDrawText(editbox[i], 400, 300 + cache, 600, 360 + cache, tocolor(0, 0, 0)) else dxDrawRectangle(400, 300 + cache, 200, 60, tocolor(0, 0, 0)) dxDrawText(editbox[i], 400, 300 + cache, 600, 360 + cache) end cache = cache + 60 end end end addEventHandler("onClientRender", root, dx_editbox) function on_mouse_scroll() if isMouseInPosition(400, 300, 200, 300) then if bind == "mouse_wheel_down" or bind == "arrow_d" then if scroll < #editbox - 5 then scroll + 1 return end elseif bind == "mouse_wheel_up" or bind == "arrow_u" then if scroll > 0 then scroll - 1 return end end end end bindkey("mouse_wheel_down", "down", on_mouse_scroll) bindkey("mouse_wheel_up", "down", on_mouse_scroll) function on_player_click(_, state) if state = "down" then for i = 1, 5 do if isMouseInPosition(400, 300 + ((i-1) * 60), 200, 60) then if editbox[i + scroll] then currentedit = i return end end end end end addEventHandler("onPlayerClick", root, on_player_click) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end
  3. postea tu script para poder ayudarte
  4. los setElementData no se guardan en ningun lado lo que es problable que tu script este usando setAccountData para guardar los elementData, los setAccountData si se guardan
  5. pues la mejor manera es compilandolo https://luac.multitheftauto.com/ o utilizar cahe="false" en el meta.xml para que no se guarden en la pc de los clientes
  6. no, solo baneara al que salio estando en la killcam
  7. function ban_palyer() local killcam = source:getData("killca") if not killcam then return end local name = source:getName() source:ban(false,false,true,root,"Salir de Killcam",14400) outputChatBox ( "#FE2E2E[LPM.KCProtection] "..name.."#FE2E2E ha sido baneado por salir de Killcam (4 horas).", root, 255, 0, 0, true ) outputDebugString ("Jugador "..name.." baneado correctamente por salir de Killcam.") end addEvenHandler("onPlayerQuit", root, ban_palyer) prueba con esto ya que veo innecesario usar un trigger
  8. que tipo de script necesitas se mas especifico ??
  9. estaba aburrido así que te realice un ejemplo para que te ayudes. para esto utilice 6 img {1,png , 2 png , 3.png} ... para que simule las llamas en movimiento texturas = {} for i = 1, 6 do texturas[i] = dxCreateTexture(i..".png") width, height = dxGetMaterialSize( texturas[i] ) end function start_anim() if anim then return end img = 1 cx, cy, cz = getPositionFromElementOffset(localPlayer,0, 5, 0) cx2, cy2, cz2 = getPositionFromElementOffset(localPlayer,2, 7, 0) cx3, cy3, cz3 = getPositionFromElementOffset(localPlayer,-2, 7, 0) cx4, cy4, cz4 = getPositionFromElementOffset(localPlayer,1, 9, 0) cx5, cy5, cz5 = getPositionFromElementOffset(localPlayer,-1, 9, 0) addEventHandler("onClientRender", root, dx_amateratsu) setTimer(stop_anim, 3000, 1,"onClientRender") end addCommandHandler("jutsu", start_anim) function stop_anim () removeEventHandler("onClientRender", root, dx_amateratsu) anim = false end function dx_amateratsu() dxDrawMaterialLine3D (cx, cy, cz, cx , cy , cz - 1,texturas[math.ceil(img)], 4, tocolor(255,255,255,255)) dxDrawMaterialLine3D (cx2, cy2, cz2, cx2, cy2, cz2 - 1,texturas[math.ceil(img)], 4, tocolor(255,255,255,255)) dxDrawMaterialLine3D (cx3, cy3, cz3, cx3, cy3, cz3 - 1,texturas[math.ceil(img)], 4, tocolor(255,255,255,255)) dxDrawMaterialLine3D (cx4, cy4, cz4, cx4, cy4, cz4 - 1,texturas[math.ceil(img)], 4, tocolor(255,255,255,255)) dxDrawMaterialLine3D (cx5, cy5, cz5, cx5, cy5, cz5 - 1,texturas[math.ceil(img)], 4, tocolor(255,255,255,255)) if math.ceil(img) < 6 then img = img + 0.1 else img = 1 end end function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z end
  10. si , para que puedas ver como funciona dicha función y aplicarlo a tu script
  11. para eso no debes reemplazar las texturas de las llamas , debes crear tus propias llamas utilizando dxDrawMaterialLine3D
  12. alex17"

    Duda

    pues yo acabo de probarlo y me anda normal
  13. alex17"

    Duda

    prueba de esta manera function DetectarEstadoHud () if detecValorH then return true else return false end end addEvent("DetectarEstadoHudHopetizenss", true) addEventHandler("DetectarEstadoHudHopetizenss", getRootElement(), DetectarEstadoHud)
  14. Bueno dejo este pequeño aporte que sirve para hacer barras progresivas compuestas por varios dxrectangle function dxMultiProgressBar(tprogreso, progreso, barras, posx, posy, ancho, largo, r, g, b, a, r2, g2, b2 ,a2) local distance = ( (ancho / 10) * 3) / (barras - 1) local bancho = (( ancho / 10) * 7) / barras local pbarra = ( tprogreso / barras) local tbarras = math.ceil( progreso / pbarra) local data1 = pbarra - (( pbarra * tbarras) - progreso) local prbarra = bancho * ( data1 / pbarra) local cache = 0 for i = 1, barras do dxDrawRectangle(posx + cache , posy, bancho, largo, tocolor(r2, g2, b2, a2)) if i < tbarras then dxDrawRectangle(posx + cache , posy, bancho, largo, tocolor(r, g, b,a)) elseif i == tbarras then dxDrawRectangle(posx + cache , posy, prbarra, largo, tocolor(r, g, b,a)) end cache = cache + bancho + distance end end ------------------------------------- -- ejemplo --- local hp = localPlayer:getHealth() dxMultiProgressBar(100, hp, 8, 800, 500, 100, 20, 0, 200, 0, 255, 30, 30, 30 ,255)
  15. el problema es que le estas dando la misma variable a cada objeto pruebalo de esta manera burgers = {} function DarHamburguesita (player) burger[player] = createObject(2880,0,0,0) exports.bone_attach:attachElementToBone(burger1,player,12,0,0,0,0,-90,0) end function Hamburguesitas (player) if((getElementData(player, "CuentaH") >6)) then if (isElement(burger[player]) ) then destroyElement(burger[player]) end end end
×
×
  • Create New...