GetKeyPress

From Soldat Community Wiki
Jump to: navigation, search
function GetKeyPress(ID: byte; Key: string):boolean

Parameter Info:
 ID (Byte): Player ID to get the key press of.
 Key (String): See Description for more information.

Description:
 This function will return true/false if a player is holding down the specified key.
 
 Key        Result
 Left       Left key
 Right      Right key
 Up         Jump/Up Key
 Down       Crouch/Down key
 Shoot      Attack button
 Jetpack    Jetpack button
 Grenade    Grenade button
 Changewep  Change weapon button
 Throw      Throw Weapon button
 Reload     Reload Button
 Crouch     Crouch/Down key
 Prone      Prone key (will stay TRUE while proned)


Examples

  if GetKeyPress(1, 'down') = true then
    WriteLn('Player 1 is crouching tiger hidden dragon!');


External Links