Arsilex Posted June 28, 2012 Share Posted June 28, 2012 Tengo un pequeño problema con un script de bombas puse esto pero no funciona Client-Side function Plantarbomba1() triggerServerEvent("onVehicleEnter", getLocalPlayer()) end Server-side function blowVehicleEnter ( thePlayer, seat, jacked ) --ENGINE START BOMB. if seat == 0 then --check if the seat the player got into was id 0 - i.e. driver seat blowVehicle ( source ) --if it was, toast him end end addEventHandler ( "onVehicleEnter", riggedVehicle, blowVehicleEnter ) Eso es cuando yo presiono el boton llamado addEventHandler ( "onClientGUIClick", Bomba1, Plantarbomba1, false ) entonces se pone una bomba en el coche y cuando alguien entre al coche quiero que explote pero no funciona ;S Link to comment
Castillo Posted June 28, 2012 Share Posted June 28, 2012 Ese evento es nativo del MTA, proba con otro nombre. Link to comment
Castillo Posted June 28, 2012 Share Posted June 28, 2012 function blowVehicleEnter ( ) blowVehicle ( getPedOccupiedVehicle ( source ) ) end addEvent ( "elEvento", true ) addEventHandler ( "elEvento", root, blowVehicleEnter ) Link to comment
Arsilex Posted June 28, 2012 Author Share Posted June 28, 2012 no se puede hacer que cuando le de al botón se ponga y cuando alguien entre al coche entonces explote no cuando le des al boton ? Link to comment
Castillo Posted June 28, 2012 Share Posted June 28, 2012 Entonces vas a tener que usar element data o una tabla server side, al entrar al vehiculo checkear si tiene esa data, entonces hacerlo explotar. Link to comment
Arsilex Posted June 28, 2012 Author Share Posted June 28, 2012 eso ya es difícil verda? Link to comment
Arsilex Posted June 28, 2012 Author Share Posted June 28, 2012 es facil de hacerlo con timer? Link to comment
Castillo Posted June 28, 2012 Share Posted June 28, 2012 No se para que necesitas un timer, lo que yo dije no es tan dificil. Link to comment
Arsilex Posted June 28, 2012 Author Share Posted June 28, 2012 por que eso cuando yo le doy al boton me explota el coche asi cuando yo le doy al boton se activa el tiempo y al pasar 30 segundos entonces explota el coche eso quiero yo Link to comment
Recommended Posts