Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Everyone say's the same: "I don't know LUA.", but... that's because you don't try to learn at all (that's my opinion.), why don't you try to use some of your time to learn? Scripting GUI tutorial: https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI Scripting tutorial: https://wiki.multitheftauto.com/wiki/Scr ... troduction Good luck.
  2. That's a cool idea, I was thinking that I should re-script it as I'am more experienced than before. Edit: Would be possible to get email's? just a suggestion.
  3. Really nice work, keep up the good work!
  4. Castillo

    Bomber

    You're welcome.
  5. That's because you can't remove the old sound.
  6. Castillo

    Bomber

    To set a vehicle alpha use: setElementAlpha(theVehicle, alpha)
  7. Castillo

    Bomber

    marker1 = getElementByID ("marker (cylinder) (1)") function MarkerHit (el) if getElementType ( el ) == "vehicle" and getVehicleName ( el ) == "Rustler" then if source == marker1 then bomb = createObject (345, 0,0,0) attachElements (bomb, el, 0, 0, -1 ) player = getVehicleOccupant (el) bindKey (player, "lshift", "down", dropbomb) end end end function dropbomb () el = getPedOccupiedVehicle(player) detachElements (bomb, el) outputChatBox ("Wups missile is gone qq") v = createVehicle (464, 0, 0, 0) p,q,r = getElementPosition (bomb) setElementPosition(v, p, q, r) outputChatBox ("New position for V") a,b,c = getElementRotation (el) setElementRotation(v, a,b,c) outputChatBox ("New rotation for V") x, y, z = getElementVelocity ( el ) setElementVelocity (v, x, y, 0) outputChatBox ("New speed for V") attachElements (bomb, v, 0, 0, 0) setTimer (explosiontrigger, 50, 0) end addEventHandler( "onMarkerHit", getRootElement(), MarkerHit) function explosiontrigger1 () x1, y1, z1 = getElementVelocity( v ) setTimer(explosiontrigger2, 50, 0) end function explosiontrigger2 () x2, y2, z2 = getElementVelocity ( v ) if z2 < z1 then x3, y3, z3 = getElementPosition ( v ) createExplosion (x3,y3,z3, 10) end end
  8. Castillo

    xml no load

    function load() if fileExists ( "conf/f.xml" ) then -- If you are loading from the same resource, then no need to put the resource name. local rooti = xmlLoadFile ("conf/f.xml") -- If you are loading from the same resource, then no need to put the resource name. if not rooti then outputDebugString("not file load") end local factionroot = xmlFindChild (rooti,"factiones",0) if (not factionroot) then outputDebugString("faction node noload") end outputDebugString ("Factions loaded!") else outputDebugString ("404") end xmlUnloadFile(rooti) end addEventHandler ( "onResourceStart", resourceRoot, load ) Try that.
  9. Castillo

    Bomber

    marker1 = getElementByID ("marker (cylinder) (1)") function MarkerHit (el) if getElementType ( el ) == "vehicle" and getVehicleName ( el ) == "Rustler" then if source == marker1 then bomb = createObject (345, 0,0,0) attachElements (bomb, el, 0, 0, -1 ) player = getVehicleOccupant (el) bindKey (player, "lshift", "down", dropbomb) end end end function dropbomb () el = getPedOccupiedVehicle(player) detachElements (bomb, el) outputChatBox ("Wups missile is gone qq") v = createVehicle (464, 0, 0, 0) p,q,r = getElementPosition (bomb) setElementPosition(v, p, q, r) outputChatBox ("New position for V") a,b,c = getElementRotation (el) setElementRotation(v, a,b,c) outputChatBox ("New rotation for V") x, y, z = getElementVelocity ( el ) setElementVelocity (v, x, y, 0) outputChatBox ("New speed for V") attachElements (bomb, v, 0, 0, 0) setTimer (explosiontrigger, 50, 0) end addEventHandler( "onMarkerHit", getRootElement(), MarkerHit) function explosiontrigger1 () x1, y1, z1 = getElementVelocity( v ) setTimer(explosiontrigger2, 50, 0) end function explosiontrigger2 () x2, y2, z2 = getElementVelocity ( v ) if z2 == z1 then x3, y3, z3 = getElementPosition ( v ) createExplosion (x3,y3,z3, 10) end end
  10. https://wiki.multitheftauto.com/wiki/OnC ... WeaponFire https://wiki.multitheftauto.com/wiki/PlaySound That sould be enough.
  11. Si, leete esto para aprender como funciona el sistema de recursos: https://wiki.multitheftauto.com/wiki/ES/Resources
  12. En lugar de preguntar porque no lo pruebas? es mas rapido y mas informativo.
  13. Creo que ya responde a la pregunta, el width y height es el tamaño, y el otro se responde por si solo, yo diria.
  14. http://www.mediafire.com/?pc44hibio13np5j You had forgot to replace the DFF file too. But, the skin 286 show's as white, 287 works fine though.
  15. Lo hiciste todo alrevez... width, height = tamaño.
  16. Simple, no lo haces, cuando Benxamix te dio el codigo se equivoco, no es el 'image path' lo que necesitas, sino el elemento GUI del que queres extraer el tamaño. local sw, sh = guiGetScreenSize ( ) local width, height = 20, 30 guiCreateStaticImage ( sw - ( width / 2 ), sh - ( height / 2 ) , width, height, "fgislogo.png", false ) function checkResolutionOnStart ( theResource ) if theResource ~= getThisResource() then return end local x,y = guiGetScreenSize() if ( x <= 640 ) and ( y <= 480 ) then outputChatBox ( "Wait! You are running this game with a low resolution. Some things would not appear on your screen. Turn resolution more than 640x480 if you can." ) end end addEventHandler ( "onClientResourceStart", getRootElement(), checkResolutionOnStart )
  17. It can't detect because is not a ELEMENT! try something like this: local sw, sh = guiGetScreenSize ( ) local width, height = 20, 30 guiCreateStaticImage ( sw - ( width / 2 ), sh - ( height / 2 ) , width, height, "fgislogo.png", false ) function checkResolutionOnStart ( theResource ) if theResource ~= getThisResource() then return end local x,y = guiGetScreenSize() if ( x <= 640 ) and ( y <= 480 ) then outputChatBox ( "Wait! You are running this game with a low resolution. Some things would not appear on your screen. Turn resolution more than 640x480 if you can." ) end end addEventHandler ( "onClientResourceStart", getRootElement(), checkResolutionOnStart ) the width and height had to be configured by yourself.
  18. "width, height = guiGetSize ( fgislogo.png )" ? what is that? you can't get the size from a image file.. you need a valid GUI element.
  19. Castillo

    Invisible objects.

    Hi everyone, I'm creating this topic because in SAUR we're having a strange bug never seen in older versions of MTA. The bug is that some players cannot see whole base objects, and I'm not talking just of one-two objects, but the WHOLE base, and this is being annoying as players start's to abuse it. I'll leave a screenshot here, if you can help, I'll be very greatfull. http://imageshack.us/photo/my-images/69 ... 23422.png/ Thanks in advance.
  20. What don't you understand? is really easy to create a simple logo in the screen.
  21. You can use one of these functions: guiCreateStaticImage dxDrawImage
  22. If you are talking about the resource category, then doesn't matter where you put it, they're just Categories to make your life better.
  23. Castillo

    Sound

    You're welcome.
×
×
  • Create New...