Jump to content

Ayuda! :D


Plate

Recommended Posts

Hola me dirian como puedo hacer para que cuando el jugador deje de tocar la w el player deje de hacer esa animacion

function camina(button, press) 
    if (press) then if button == 'w' then 
    setPedAnimation ( source, "muscular", "MuscleRun") 
    else 
        setPedAnimation(source,false) 
        end 
    end 
end 
addEventHandler("onClientKey", getRootElement(), camina) 

Link to comment

function camina(button, press)

function camina(button, press) 
    if (press) button == 'w' then 
    setPedAnimation ( source, "muscular", "MuscleRun") 
    else 
        setPedAnimation(source,false) 
        end 
    end 
end 
addEventHandler("onClientKey", getRootElement(), camina) 

???

Link to comment

deberas usar la funcion bindKey

cheka los argumentos del keyState

dice tiene 3 distintas

Deberas usar el state "down" (explica que al undir el boton se ejecutara) osea, ke al undir la tecla W ara la animacion

y deberas usar la misma bind key pero en state "up" que al soltar la tecla, deje de hacer la animacion..

Suerte

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...