Matty Posted September 13, 2012 Share Posted September 13, 2012 Ayuda, por favor; No me devuelve el anim ._. Code: function myped (source) faBlockz = getElementData (root,"blockz") faAnimz = getElementData (root,"animz") if faBlockz == "SMOKING" and faAnimz == "F_smklean_loop" then setPedAnimation (source,false) else setPedAnimation (source, "SMOKING", "F_smklean_loop", 300, true, false, false, true ) end end addCommandHandler ( "smoke", myped ) Link to comment
Castillo Posted September 13, 2012 Share Posted September 13, 2012 Estas intentando hacer que si esta haciendo la animacion, la deje de hacer, y si no, la empieze a hacer? Link to comment
Matty Posted September 13, 2012 Author Share Posted September 13, 2012 Estas intentando hacer que si esta haciendo la animacion, la deje de hacer, y si no, la empieze a hacer? Exactamente exacto (: Link to comment
Castillo Posted September 13, 2012 Share Posted September 13, 2012 function myped ( thePlayer ) setElementData ( thePlayer, "smoking", not getElementData ( thePlayer, "smoking" ) ) if ( getElementData ( thePlayer, "smoking" ) ) then setPedAnimation ( thePlayer ) else setPedAnimation ( thePlayer, "SMOKING", "F_smklean_loop" ) end end addCommandHandler ( "smoke2", myped ) Probalo. Link to comment
Castillo Posted September 13, 2012 Share Posted September 13, 2012 Lo pusiste como server side, no? Link to comment
Matty Posted September 13, 2012 Author Share Posted September 13, 2012 Si, server side, y en el debug no hay errores. Link to comment
Castillo Posted September 13, 2012 Share Posted September 13, 2012 Ok, copialo de nuevo, lo probe y funciona. Link to comment
Matty Posted September 13, 2012 Author Share Posted September 13, 2012 Bien, Gracias Solid, ahora te pregunto, en la linea 6, se le puede agregar los argumentos opcionales? porque se va para todos lados el ped . Link to comment
Castillo Posted September 13, 2012 Share Posted September 13, 2012 Solo los necesarios, porque esa era la cause de no poder parar la animacion. Link to comment
Recommended Posts