samp.directory
← Skrypty i biblioteki

leamir/Samp-EasyKeys

Brak opisu na GitHubie.

Biblioteka★ 1zaktualizowano mar 2026MITPawnsampctl
Otwórz na GitHubie

Zainstaluj za pomocą sampctl

sampctl package install leamir/Samp-EasyKeys

Uruchom to w folderze swojego projektu. sampctl pobiera pakiet i to, od czego zależy.

Wypróbuj w kompilatorze Pawn →

Dodaje jej pliki include, razem z bibliotekami, od których zależy, do kompilatora Pawn w twojej przeglądarce, gotowe do dołączenia w skrypcie.

Zależy od 1 pakietu

README.md

EasyKeys

A include to facilitate the detection of keys in SA-MP.

English | Português

Defines:

#define KEY_HOLD_DETECTION_TIME 100
  • Time in milliseconds to detect if a key is considered held down (default: 100ms)

Callbacks:

forward OnPlayerKeyPressed(playerid, KEY:key, bool:isHeld)
  • Called when a new key is pressed (isHeld = false)
  • Called when a key is held down for KEY_HOLD_DETECTION_TIME milliseconds (isHeld = true)
  • If isHeld is true, player pressed the key KEY_HOLD_DETECTION_TIME ms ago. If false, the key was just released by the player (in under KEY_HOLD_DETECTION_TIME ms)
forward OnPlayerKeyReleased(playerid, KEY:key, bool:isHeld)
  • Called when a key is released
  • isHeld holds if the key was held down(same value as in OnPlayerKeyPressed callback)

Functions:

stock IsKeyBeingPressedByPlayer(playerid, KEY:key)
  • Returns 1 if the specified key is currently being pressed by the player, 0 otherwise
  • Since keys are bit masks, you can combine multiple using bitwise OR (|)
stock KEY:GetPlayerPressedKeys(playerid)
  • Returns the current keys being pressed by the player as a bit mask

Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem