Garry's Mod Wiki

Revision Difference

Player:KeyReleased#518025

<function name="KeyReleased" parent="Player" type="classfunc"> <description>Gets whether a key was just released this tick</description> <realm>Shared</realm> <args> <arg name="key" type="number">The key, see &lt;page&gt;IN&lt;/page&gt;</arg>⤶ <arg name="key" type="number">The key, see <page>IN</page></arg>⤶ </args> <rets> <ret name="" type="boolean">Was released or not</ret> </rets> </function> <example> <description>Prints whenever the first player first stops pressing W</description> <code> hook.Add( "Tick", "CheckPlayer1Forward", function() if Entity( 1 ):KeyReleased( IN_FORWARD ) then print("Ent1 just stopped moving forward!") end end) </code> </example>