Atouk Posted February 22, 2013 Share Posted February 22, 2013 Hola, tengo un script que es de una linterna, pero quiero q la linterna este en el arma. Y porfavor si tengo algun error me lo dicen, gracias. script: function start( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do setElementData(player,"tiene.Linterna",false) end end addEventHandler ( "onResourceStart", getRootElement(), start ) function onJoin( ) setElementData(player,"tiene.Linterna",false) end addEventHandler ( "onPlayerJoin", getRootElement(), onJoin) function linterna ( thePlayer ) local linternaEstado = getElementData(thePlayer,"tiene.Linterna") if linternaEstado == false then local x, y, z = getElementPosition ( thePlayer ) luz = createObject ( 3872, x, y, z, 0, 0, 0 ) attachElements ( luz, thePlayer, 0, 0, 0 ) setElementData(thePlayer,"tiene.Linterna",true) else destroyElement(luz) setElementData(thePlayer,"tiene.Linterna",false) end end addCommandHandler ( "linterna" , start ) addCommandHandler ( "linterna" , onJoin ) Link to comment
EpicZ Posted February 22, 2013 Share Posted February 22, 2013 Interesante script, ¿está testeado o algo? ¿Cómo funciona? o ¿Aun no está listo? Ojalá que alguien le ayude.. lamento decir que yo no puedo Link to comment
Recommended Posts