MTA Team 0xCiBeR Posted April 15, 2013 MTA Team Posted April 15, 2013 Hola como podria hacer para que cuando 1 zombie gordo(que tenga skin de gordo), ya se bombero o alguno otro, al morir, que explote..??? Esto es lo que hize...Aunque no crea la explosion??... addEventHandler("onZombieWasted",root, function (source) local posX,posY,posY = getElementPosition( source ) if ( getElementModel ( source ) == 22 ) then createExplosion ( posX, posY, posZ, 10 ) end end) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Alexs Posted April 15, 2013 Posted April 15, 2013 Si estas en un recurso aparte, recuerda añadir el evento con: addEvent y quita 'source' de la función. Developer @ MYVAL
MTA Team 0xCiBeR Posted April 15, 2013 Author MTA Team Posted April 15, 2013 Puse asi y sigue sin crearse la explosion?.. addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function () local posX,posY,posY = getElementPosition( source ) if ( getElementModel ( source ) == 22 ) then createExplosion ( posX, posY, posZ, 10 ) end end) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
NodZen Posted April 15, 2013 Posted April 15, 2013 Para que usas source en getElementPosition? Si tienes que obtener las coordenadas del zombie , no del player. ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
MTA Team 0xCiBeR Posted April 15, 2013 Author MTA Team Posted April 15, 2013 xq el source del evento es un zombie verdad?.... ademas da igual se crearia la explosion en el player..Pero no se crea ni en el zombie ni en el player DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
NodZen Posted April 15, 2013 Posted April 15, 2013 Probalo asi haber function ( zombie ) if getElementType ( zombie ) == "ped" and getElementModel ( zombie ) == 22 then local x,y,z = getElementPosition ( zombie ) createExplosion ( x, y, z, 10 ) end end addEvent("onZombieWasted",true) addEventHandler("onZombieWasted", getRootElement(), ) ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
MTA Team 0xCiBeR Posted April 15, 2013 Author MTA Team Posted April 15, 2013 noop tampoco DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted April 15, 2013 Author MTA Team Posted April 15, 2013 esta bien..ahi lei la wiki de los zombies...el source del evento es el zombie que muere...asi que no se DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
NodZen Posted April 15, 2013 Posted April 15, 2013 ok, Saca esos eventos y prueva con este: onPedWasted ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
MTA Team 0xCiBeR Posted April 15, 2013 Author MTA Team Posted April 15, 2013 no tampoco funciona... :7 DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
EstrategiaGTA Posted April 16, 2013 Posted April 16, 2013 ok, Saca esos eventos y prueva con este: onPedWasted ¿Prueva?
Plate Posted April 16, 2013 Posted April 16, 2013 ok, Saca esos eventos y prueva con este: onPedWasted ¿Prueva? Prueba* addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( killer ) if ( killer and getElementType ( killer ) == "player" ) then local zombieSkin = getElementModel(source) if (zombieSkin == 22) then createExplosion(x, y, z, 10) end end end ) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
MTA Team 0xCiBeR Posted April 16, 2013 Author MTA Team Posted April 16, 2013 Mmm no funcaa... DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Plate Posted April 17, 2013 Posted April 17, 2013 Algun error en el debug? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Sensacion Posted April 17, 2013 Posted April 17, 2013 addEventHandler("onZombieWasted",root, function () local posX,posY,posZ = getElementPosition( source ) if ( getElementModel ( source ) == 22 ) then createExplosion ( posX, posY, posZ, 10 ) end end )
MTA Team 0xCiBeR Posted April 18, 2013 Author MTA Team Posted April 18, 2013 Sensacion es el mismo script que el mio..... doble :facepalm: ._. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Plate Posted April 18, 2013 Posted April 18, 2013 Pero cual es el error en el debugscript con mi script Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Sensacion Posted April 19, 2013 Posted April 19, 2013 Sensacion es el mismo script que el mio..... doble :facepalm: ._. que raro, a mi me funcionó la explosión, no lo usé con un zombie, sino con un player normal, y con el otro evento, y no es el mismo, el tuyo es "posY,posY" doble coordenada. "Y"
Castillo Posted April 19, 2013 Posted April 19, 2013 addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( ) local posX, posY, posZ = getElementPosition ( source ) if ( getElementModel ( source ) == 22 ) then createExplosion ( posX, posY, posZ, 10 ) end end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MTA Team 0xCiBeR Posted April 19, 2013 Author MTA Team Posted April 19, 2013 tampoco funciona Solid DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted April 19, 2013 Author MTA Team Posted April 19, 2013 Pero cual es el error en el debugscript con mi script Pues no da error ._. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
AlvareZ_ Posted April 19, 2013 Posted April 19, 2013 addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( ) local pX, pY, pZ = getElementPosition ( source ) if ( getElementModel ( source ) == 22 ) then createExplosion ( pX, pY, pZ, 10, source ) end end )
MTA Team 0xCiBeR Posted April 19, 2013 Author MTA Team Posted April 19, 2013 Tampoco ._. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted April 19, 2013 Posted April 19, 2013 Lo tenes puesto como server side el script, no? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MTA Team 0xCiBeR Posted April 19, 2013 Author MTA Team Posted April 19, 2013 Lol....Lo tenia puesto server side... pero escrito asi serrver gracias solid y gracias a los demas e.e DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Recommended Posts