Araa Posted July 31, 2012 Posted July 31, 2012 Ehm bueno, lo que les queria preguntar es si existe algun evento que trigee una funcion cuando el jugador se mueve, o cuando apunta un arma. Por ejemplo: function back(player) outputChatBox("You are no longer AFK",255,0,0,player) end para que muestre el mensaje cuando el jugador se mueva o apunte un arma, muchas gracias.
Castillo Posted July 31, 2012 Posted July 31, 2012 No, pero podes hacerlo comparando la posicion con una guardada previamente.
Alexs Posted July 31, 2012 Posted July 31, 2012 Tambien podes bindear todas las keys o algunas para que cuando las pulse se le retire el AFK
Araa Posted August 5, 2012 Author Posted August 5, 2012 Ehm bueno, alfinal hice algo, gracias por la ayuda, ahora tengo un problema mas: -- Server function startDancing(player) if (isPedOnGround) then setPedAnimation(player,"DANCING", "dnce_m_b") end end addCommandHandler("dance",startDancing) function stopDancingEvent(player) setPedAnimation(player,false) end addEvent("stopDancing",true) addEventHandler("stopWalking",getRootElement(),stopDancingEvent) -- Client function stopDancing(button,press) if (press) then if (button == "w") then triggerServerEvent("stopDancing",getLocalPlayer()) end end end addEventHandler("onClientKey", root,stopDancing) El problema es que no se detiene y me dice que el argumento en setPedAnimation no es valido, alguna idea?
Castillo Posted August 5, 2012 Posted August 5, 2012 function stopDancingEvent() setPedAnimation(source) end addEvent("stopDancing",true) addEventHandler("stopWalking",getRootElement(),stopDancingEvent)
Recommended Posts