Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    [HELP]asd

    onClientPlayerWeaponFire playSound3D
  2. Castillo

    Car color

    addEventHandler ( "onVehicleEnter", root, function ( ) setVehicleColor ( source, math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) end )
  3. Post your entire script.
  4. That's because is not a native MTA function, is exported from "bone_attach" resource ( make sure you have it and is running ), you must do it this way: exports [ "bone_attach" ]:attachElementToBone(kb_beer,player,MarkerHit1,1463.541015625,-2207.1723632813,13.546875,0,0,0)
  5. I don't understand what do you mean.
  6. You can't move the HUD components, you can hide/show them with: showPlayerHudComponent
  7. No, is currently not possible, I don't know if in future they'll implement such feature.
  8. Castillo

    Join Failed

    No point on using dxDrawColorText, you can use the colorCoded argument from dxDrawText.
  9. Make a variable defining if the gate is moving or not.
  10. Castillo

    Question

    I don't see it in the elements page "Element" Would you please stop posting if you have absolutely no idea of what is all about?
  11. Castillo

    Question

    You must make a different script then.
  12. Castillo

    Question

    function guidxCreateWindow(x,y,w,h,text) local win = guiCreateStaticImage( x,y,w,h, "black.png", false) local wx, wy = guiGetSize ( win, false ) guiSetProperty( win, "Alpha", 70) local winup = guiCreateStaticImage( 0,0,1,0.1, "winup.jpg", true, win ) local text = guiCreateLabel(0,0,1, 1,text,true, winup) guiSetProperty( text, "Alpha", 300) guiLabelSetHorizontalAlign(text, "center") guiLabelSetVerticalAlign(text, "center") guiSetFont ( text, guiCreateFont( "font.ttf", 30 ) ) return win end --------------------------------------------------TEST------------------------------------------- local sx,sy = guiGetScreenSize ( ) local dxgui = guidxCreateWindow( sx*0.5, sy*0.5, sx*0.6, sy*0.6,"TEST PANEL") guiSetVisible ( dxgui, false ) function move ( ) local x, y = guiGetPosition ( dxgui, false ) local w, h = guiGetSize ( dxgui, false ) local now = getTickCount() local elapsedTime = now - start local endtime = start + 1000 local duration = endtime - start local progress = elapsedTime / duration local w1, h1, z = interpolateBetween ( 0, 0, 0, w, h, 0, progress, "Linear") local x1 = x-(w1/2) local y1 = y-(h1/2) guiSetPosition ( dxgui, x1, y1, false) guiSetSize ( dxgui, w1, h1, false) end function test ( ) if ( guiGetVisible ( dxgui ) == false ) then guiSetVisible ( dxgui, true ) start = getTickCount() addEventHandler ("onClientRender", root, move) else guiSetVisible ( dxgui, false ) removeEventHandler ("onClientRender", root, move) end end bindKey ("F2","down", test)
  13. Puede que tenga un problema.
  14. Add this after pickup creation: outputChatBox ( tostring ( p ) )
  15. Castillo

    Question

    What do you mean?
  16. Ah, I found the problem, it says "localplayer" at getElementData. Change: local score = tostring ( tonumber ( getElementData ( localplayer, "Score" ) ) or 0 ) to: local score = tostring ( tonumber ( getElementData ( localPlayer, "Score" ) ) or 0 )
  17. I already knew that it was on the code, so if it doesn't appear on the game, then it means you've filled wrong values at createPickup.
  18. Is the pickup created?
  19. Podrías convertir a string, usar string.find para encontrar la posición del ".", luego usar una variable que sea igual a: 6 - la posición + 1, y mandar esta variable al segundo argumento del math.round no creo que eso sirva.... ademas ya eh encontrado otra manera de sacar lo que quieria gracias de todos modos Podrias decir como lo solucionaste? a otro le podria servir.
  20. Proba con este: https://community.multitheftauto.com/in ... ls&id=5996 P.D: Lo encontre buscando "umbrella" en la pagina de la comunidad.
  21. Castillo

    Question

    local dxgui = guidxCreateWindow(x1,y1,w1, h1,"SHOP PANEL",70) Remove the 'local' infront of it.
  22. function equi ( ) setPedStat ( source, 75, 500 ) end addEventHandler ( "onPlayerJoin", root, equi ) addEvent ( "onZombieWasted",true ) addEventHandler ( "onZombieWasted", root, function ( killer ) if ( isElement ( killer ) and getElementType ( killer ) == "player" ) then local current = getPedStat ( killer, 75 ) setPedStat ( killer, 75, ( current + 100 ) ) end end )
  23. My script has to work, copy it exactly like I posted. @V.Krumins: That's the same thing as my script.
×
×
  • Create New...