Kilfwan Posted October 17, 2015 Posted October 17, 2015 (edited) Aqui algo sencillo y bueno para poner diferentes sonidos a cada arma del DayZ. table_f = { {"Ballesta","file/Crossbow.wav","currentweapon_1",33}, {"Bizon PP-19 SD","file/mp5.wav","currentweapon_2",29}, --{WEAPON,FILE,CURRENT 1 OR 2, ID WEAPON} } max_distance = 10 addEventHandler("onClientPlayerWeaponFire", root, function (weapon, _, _, _, _, _, _) for _, v in pairs( table_f ) do weapons, file, current, id = v[1],v[2],v[3],v[4] if weapon == id then if getElementData(getLocalPlayer( ), current) == weapons then x,y,z = getPedWeaponMuzzlePosition( getLocalPlayer( ) ) song = playSound3D( file, x,y,z, false ) setSoundMaxDistance(song, max_distance) setSoundVolume(song,3) end end end end ) Algun bug avisan. Edited October 18, 2015 by Guest NaciónZ Developing server to the 65 %
Guest Posted October 17, 2015 Posted October 17, 2015 Y los sonidos? x2 Tal vez él sólo quería compartir el script... no lo sé
Tomas Posted October 17, 2015 Posted October 17, 2015 ¿Y no se escucha arriba de los originales? Currently developing for International Gaming Community - Join us!
DeathMta Posted October 17, 2015 Posted October 17, 2015 Aqui algo sencillo y bueno para poner diferentes sonidos a cada arma del DayZ. if getElementData(getLocalPlayer( ), "currentweapon_1") == weapon then Algun bug avisan. yo que sepa ese script tuyo es para armas primarias , no para secundarias ya que el currentweapon varia Nesecitas Ayudas solo Mandame PM!! Death Scripts Ayudando a la comunidad sin fines de lucro!
DeathMta Posted October 17, 2015 Posted October 17, 2015 if getElementData(getLocalPlayer( ), "currentweapon_1") == weapon or getElementData(getLocalPlayer( ), "currentweapon_2") == weapon or getElementData(getLocalPlayer( ), "currentweapon_3") == weapon then asi no seria? Nesecitas Ayudas solo Mandame PM!! Death Scripts Ayudando a la comunidad sin fines de lucro!
Kilfwan Posted October 17, 2015 Author Posted October 17, 2015 Yo que sepa las armas especiales( las 3eras ) son las granadas y bate y hacha, Apenas llegue a mi casa corrigió lo de que se escucha bajo el sonido del arma. NaciónZ Developing server to the 65 %
Kilfwan Posted October 19, 2015 Author Posted October 19, 2015 Cuando pongas algún recurso, podrías hacerlo bien y completo. Parece que vienes a poner un recurso que mal hecho está y luego todos terminan ayudandote por que el recurso está mal hecho. Si quieres que te ayuden con tus recursos, hacelo en la sección scripting. Se aprende de los errores , Y como muchos buenos programadores aprender solo es mejor para saber como lo hicistes y demás. Pero trataré de hacer las cosas mejor NaciónZ Developing server to the 65 %
aka Blue Posted October 19, 2015 Posted October 19, 2015 if getElementData(getLocalPlayer( ), "currentweapon_1") == weapon or getElementData(getLocalPlayer( ), "currentweapon_2") == weapon or getElementData(getLocalPlayer( ), "currentweapon_3") == weapon then asi no seria? No entiendo ésta parte, explícamela.
Recommended Posts