Jump to content

ItachiUchiha

Members
  • Posts

    11
  • Joined

  • Last visited

Details

  • Gang
    ballas

Recent Profile Visitors

231 profile views

ItachiUchiha's Achievements

Square

Square (6/54)

0

Reputation

  1. It is: <script src="files/data/deathrepair/deathpickup.lua" type="server" />
  2. Didn't work either. And now I don't get any errors on the debug.
  3. Didn't work, the object is not created and I get this error: Bad argument @ 'isVehicleBlown' [Expected vehicle at argument 1, got boolean]
  4. Hello, I have this script that creates an object when a player dies: addEventHandler("onPlayerWasted", getRootElement(), function () local creator = getPlayerName(source) local fX, fY, fZ = getElementPosition (source) createObject ( 1212, fX, fY, fZ+0.5) triggerClientEvent ( 'play', source ) end ) I have the problem that when the player is dead for afk (and the ped inside the car is killed) the object is created, and I want to create that object only when the player's vehicle is exploded. I tried to use isVehicleBlown but using it the object is not created, and that don't give me any errors on the debug. addEventHandler("onPlayerWasted", getRootElement(), function () local theVehicle = getPedOccupiedVehicle(source) if (theVehicle) then if isVehicleBlown(theVehicle) then local creator = getPlayerName(source) local fX, fY, fZ = getElementPosition (source) createObject ( 1212, fX, fY, fZ+0.5) triggerClientEvent ( 'play', source ) else --nothing end end end )
  5. Sure, I did it. The problem is that I don't know LUA, I build that script using common sense and google, I wasted a lot of time doing that and reading old posts from this forum in order to make it works. Then if you can say me where is my exact error and you can help me with this I will really appreciate it.
  6. Didn't work, using this i can't see the weapons and don't fire too
  7. how can i make it? or what I have to change? and I have to change whole script?
  8. Hi! I'm a new fag on this, I barely could build this script to make that the car have weapons mounted (like Twisted Metal cars): local weapon = createWeapon("ak47", 0, 0, 1 ) local weapon2 = createWeapon("ak47", 0, 0, 1 ) setElementAlpha ( weapon, 0) setElementAlpha ( weapon2, 0) local weaponINV = createWeapon("ak47", 0, 0, 1 ) local weapon2INV = createWeapon("ak47", 0, 0, 1 ) function createAndFire() local theVehicle = getPedOccupiedVehicle ( localPlayer ) if theVehicle then local x,y,z = getElementPosition ( theVehicle ) local rX,rY,rZ = getElementRotation(theVehicle) attachElements ( weapon, theVehicle, 1, 2, 0, 0, 0, 90 ) attachElements ( weapon2, theVehicle, -1, 2, 0, 0, 0, 90 ) attachElements ( weaponINV, theVehicle, 1, 2, 0, 0, 0, 95 ) attachElements ( weapon2INV, theVehicle, -1, 2, 0, 0, 0, 95 ) fireWeapon(weapon) fireWeapon(weapon2) end end bindKey("mouse2", "down", createAndFire) addEventHandler("onClientResourceStart", resourceRoot, createAndFire) This works good. But now I wanted to know how to make it works with other players. I mean, I tested it with my friend and when I shoot him he don't get damage, and he can't see my weapons on the car too, and I either.
  9. ¿Debo combinar ese script con el script de disparo de misiles que ya poseo? ¿o debo solo utilizar el fireWeapon añadiendole al final el "bindKey("vehicle_fire..."? No sé como funciona exactamente el script que me dices, pero me gustaria que no fuese visible el arma, mas solo las balas de esta. Tambien, ¿eso funciona con las armas de vehiculos que mencione de la minigun del SPARROW, HUNTER y el disparo del PREDATOR? Disculpa si son muchas dudas, es que soy muy nuevo en esto. Prefiero preguntar que dar la hora editando cosas que no estoy entiendo bien. EDIT: Ya pude armarlo con eso, muchas gracias
  10. Hola! verán, soy algo nuevo en esto de los scripts, sé googlear y tengo bastante sentido común para encontrar y entender comandos y esas cosas. Pero como el conocimiento siempre es necesario, ahora es cuando me topé con algo en lo que necesito ayuda. El coso es que tengo un servidor casero de Shooter (que pronto quiero ampliar y hacer algo más serio) y dentro del servidor me gustaría aplicar varios tipos de disparo. Mi pregunta va hacia el script específico de "createProjectile": https://wiki.multitheftauto.com/wiki/CreateProjectile function shootProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle)then local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) end end bindKey("vehicle_fire", "down", shootProjectile) Hasta ahí todo bien y entiendo como funciona el script, la dude me surge porque noté en el wiki que solo hay cierto tipos de proyectiles capaces de ejecutar en el vehículo: Mi pregunta va directamente a si es posible (con o sin este script) hacer que el vehículo dispare otro tipo de proyectiles, por ejemplo las balas del bote de policía PREDATOR o las minigun del SPARROW y HUNTER, y también si es posible disparar armas de fuego (estas sin la necesidad del "drive by", sino que al presionar la key del "vehicle_fire" dispare por ejemplo balas de AK-47 hacia el frente tal y como dispara el misil normal). Espero haber sido lo suficientemente claro y les agradezco de antemano a los que me ayuden con esto.
×
×
  • Create New...