Jump to content

Sasu

MTA Contributors
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Sasu

  1. Sasu

    Ayuda element

    function humo (thePlayer) local miauto = getPedOccupiedVehicle ( thePlayer ) if (getElementData (miauto, "estado")== "prendido") then if isElement(smokee) then destroyElement ( smokee ) end setElementData (miauto, "estado", false) else local x,y,z = getElementPosition( miauto ) smokee = createObject(2780,x+0.5, y, z) attachElements ( smokee, miauto, 0, 0, 0 ) setElementCollisionsEnabled ( smokee, false ) setElementAlpha ( smokee, 0 ) setElementData (miauto, "estado", "prendido") end end addCommandHandler ( "humo", humo )
  2. Or you can use this resource: https://community.multitheftauto.com/index.php?p= ... ls&id=3016
  3. Again: https://community.multitheftauto.com/index.php?p= ... ls&id=7067 DONE! and banned.
  4. Stolen: https://community.multitheftauto.com/index.php?p= ... ls&id=7065 Original: https://community.multitheftauto.com/ind ... ls&id=6933 DONE!
  5. Sasu

    Ayuda colshape

    Intenta asi: function pullItem(item, ammo) local x, y ,z = getElementPosition(source) theWeapon = createObject(358, x, y, z- 1, 70, 0, 0) colshape = createColTube ( x, y, z, 0.5, 0.5 ) setElementData(colshape, "Arma", 34) setElementData(colshape, "Municion", ammo) takeWeapon(source, 34) end addEvent("onPlayerPullSniper", true) addEventHandler("onPlayerPullSniper", getRootElement(), pullItem) function pickupWeapon(source) if isElementWithinColShape(source, colshape) then outputChatBox("/a", source, 0, 255, 255) giveWeapon(source, tonumber(getElementData(colshape, "Arma")), tonumber(getElementData(colshape, "Municion"))) destroyElement(colshape) destroyElement(theWeapon) end end addCommandHandler("a", pickupWeapon)
  6. Very nice job!! Keep up MTA Team!
  7. Sasu

    Spaw

    Prueba parando el resource 'freeroam'.
  8. Eso es porque nunca creaste la imagen. Intenta asi: function Nomnre() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) guiSetVisible(Logo, false) end addEventHandler("onClientResourceStart", resourceRoot, Nomnre) setTimer ( function() guiSetVisible(Logo, true) setTimer(guiSetVisible, 3000, 1, Logo, false) end, 8000, 0 )
  9. That's wrong because onElementDestroy have not parameters.
  10. Sasu

    Ayuda...Smoke

    Tienes el objecto ID 2780, que es una maquina que tira humo pero no se le puede cambiar el color. Tambien, si quieres, lo puedes hacer invisible con el Alpha y para que se pueda traspasarlo puedes usar setElementCollisionsEnabled
  11. marker1 = createMarker (2093,-2478,12.5,"cylinder",1.2,255,255,0,255) marker2 = createMarker (-1667,-259,12.5,"cylinder",20.0,255,0,0,0) marker3 = createMarker (1478,1746,9.5,"cylinder",20.0,255,0,0,0) marker4 = createMarker (2054,-2593,12.5,"cylinder",20.0,255,0,0,0) progreso = 1 createBlip ( 2129.4560546875, -2479.3818359375, 13.546875, 56 ) function createPilotoTeam () Pilototeam = createTeam ("Piloto", 255, 255, 0) end addEventHandler ("onResourceStart", resourceRoot, createPilotoTeam) function joinPiloto() setPlayerTeam(source,Pilototeam) setElementModel(source, 61) setElementData( source, "Occupation", "Pilototeam", true ) setMarkerColor ( marker1, 255, 255, 0, 255 ) outputChatBox("Ahora Fuiste Asignado Piloto!!!",source,255,255,0) end addEvent("setPiloto", true) addEventHandler("setPiloto",root,joinPiloto) function part1 (player) local team = getPlayerTeam(player) if not team then return end local teamName = getTeamName(team) if team and teamName == "Piloto" then if progeso == 1 then outputChatBox("Comenzando Mision!!! Vuela Asia SF Y LV Y Luego Regresa A LS",root,255,255,0,true) blip2 = createBlip ( -1667,-259,12, 19 ) car = createVehicle(519,2057,-2494,14,0,0,89) setMarkerColor ( marker2, 255, 0, 0, 255 ) progreso = 2 end end end addEventHandler( "onMarkerHit", marker1, part1 ) function part2 (player) local team = getPlayerTeam(player) if not team then return end local teamName = getTeamName(team) if team and teamName == "Piloto" then if progreso == 2 then outputChatBox("Primer Vuelo Completo Recompensa 4000$.Proximo Vuelo Hacia Las Venturas",root,255,255,0,true) blip3 = createBlip ( 1478,1746,9, 19 ) givePlayerMoney ( player, 4000 ) setMarkerColor ( marker3, 255, 0, 0, 255 ) setMarkerColor (marker2, 255,0,0,0) destroyElement(blip2) progreso = 3 end end end addEventHandler( "onMarkerHit", marker2, part2 ) function part3 (player) local team = getPlayerTeam(player) if not team then return end local teamName = getTeamName(team) if team and teamName == "Piloto" then if progreso == 3 then outputChatBox("Segundo Vuelo Completo Recompensa 4000$! Regresa A Los Santos Para Finalizar La Mision",root,255,255,0,true) blip4 = createBlip ( 2054,-2593,12, 19 ) givePlayerMoney ( player, 4000 ) setMarkerColor ( marker4, 255, 0, 0, 255 ) setMarkerColor (marker3,255,0,0,0) destroyElement(blip3) progreso = 4 end end end addEventHandler( "onMarkerHit", marker3, part3 ) function part4 (player) local team = getPlayerTeam(player) if not team then return end local teamName = getTeamName(team) if team and teamName == "Piloto" then if progreso == 4 then outputChatBox("Mision Completa! Felicitaciones!!!",root,255,255,0,true) destroyElement ( car ) givePlayerMoney ( player, 0 ) setMarkerColor(marker4,255,0,0,0) destroyElement(blip4) progreso = 1 end end end addEventHandler( "onMarkerHit", marker4, part4 )
  12. Y sino intenta asi: function Nomnre() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) end setTimer ( function() guiSetVisible(Logo, true) setTimer(guiSetVisible, 3000, 1, Logo, false) end, 8000, 0 )
  13. Try this: function theFormat(player) local ID = getElementData(player, "ID") return ID end function id(text, msgtype) local ids = theFormat(player) local pName = getPlayerName(source) if (msgtype == 0) then cancelEvent() outputChatBox("#808080(ID: "..ids..") #FFFFFF"..pName..": #ebddb2"..text, getRootElement(), 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, id)
  14. dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, true, false ) dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, true, false )
  15. function start() PANEL2 = guiCreateWindow(201, 186, 394, 172, "", false) guiWindowSetSizable(GUIEditor.window[1], false) JUGAR = guiCreateButton(32, 45, 150, 90, "Jugar con el mismo personaje", false, PANEL2) guiSetFont(GUIEditor.button[1], "default-bold-small") REGRESAR = guiCreateButton(211, 45, 150, 90, "Regresar al Menú", false, PANEL2) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetVisible(PANEL2, false) showCursor(false) addEventHandler("onClientGUIClick", JUGAR, jugarrr) addEventHandler("onClientGUIClick", REGRESAR, regresarrr) end addEventHandler("onClientResourceStart", root, start) function ondead() if source == localPlayer then setTimer(guiSetVisible, 5000, 1, PANEL2, true) setTimer(showCursor, 5000, 1, true) end end addEventHandler("onClientPlayerWasted", getRootElement(), ondead)
  16. You're welcome. Read the example on the wiki: guiStaticImageLoadImage
  17. Sasu

    Ayuda /fix

    function mamamia (player, command) local prachy = getPlayerMoney(player) local auto = getPedOccupiedVehicle(player) if auto and prachy >= 2000 then fixVehicle(auto) takePlayerMoney(player, 2000) outputChatBox("Your vehicle has been fixed - 2000$. You have $" .. getPlayerMoney(player), player, 0, 255, 0) else outputChatBox("You don't have a 2000$", player, 250, 0, 0 ) end end addCommandHandler("fix", mamamia) Tenias el fixVehicle arriba del if por lo que reparaba el auto aun o no tengas la plata.
  18. Pues quien dijo que te estaba diciendote a vos. Solo para que el que pregunto sepa que no tiene ese argumento. Ademas parece que alguien se desperto de mal humor. Perdona si te moleste.
  19. Ese source en el outputChatBox esta mal porque en clientside no tiene el argumento de visibleTo.
  20. You can cancelEvent on clientside. addEventHandler("onClientPlayerDamage", getLocalPlayer(), function (attacker, weapon) if not weapon then return end if weapon == 16 then cancelEvent() local health = getElementHealth(source) setElementHealth(source, health-1) end end )
  21. Usas una funcion que se eliminara. Usa: getPedOccupiedVehicle en vez de getPlayerOccupiedVehicle.
×
×
  • Create New...