SerweryWłasny serwerDla twórcówForumFAQDokumentacjaBezpieczeństwo
Pobierz launcher
  1. Dokumentacja
  2. Funkcje serwera
  3. getCommandsBoundToKey

Funkcja

getCommandsBoundToKey

Zwraca komendy podpięte u gracza pod klawisz.

Składnia

table getCommandsBoundToKey(player thePlayer, string key [, string keyState])

Argumenty

thePlayerplayer
Gracz.W MTA:SA inny typ: string theKey
keystring
Klawisz.
keyStatestring, opcjonalny
"down", "up"; bez niego oba stany.Nie ma go w MTA:SA

Różnice względem MTA:SA

  • Argumenty zaznaczone innym kolorem różnią się od MTA:SA.

W MTA:SA

getCommandsBoundToKey(string theKey, string keyState)

Zwraca

Tablica nazw komend.

Przykład

local list = getCommandsBoundToKey(player, "F1")
outputChatBox("F1: " .. table.concat(list, ", "), player)

Zobacz też