Garry's Mod Wiki

Player:KeyReleased

Player:KeyReleased

  boolean Player:KeyReleased( number key )

Description

Gets whether a key was just released this tick.

Arguments

1 number key
The key, see Enums/IN

Returns

1 boolean
Was released or not

Example

Prints whenever the first player first stops pressing +forward key (w on QWERTY keyboards).

hook.Add( "Tick", "CheckPlayer1Forward", function() if Entity( 1 ):KeyReleased( IN_FORWARD ) then print( "Player1 just stopped moving forward!" ) end end )

Special Pages


Wikis

?

Render Time: 21ms

DB GetPage 3
Generate Html 4
SaveChanges (1) 6
Render Body 0
Render Sidebar 7