Проверка зажатых пары клавиш

Статус
В этой теме нельзя размещать новые ответы.

vvvlvs

Новичок
Автор темы
20
0
форматирование
Версия MoonLoader
.026-beta
Как правильно написать , чтоб при зажатой пкм+A


local hendleResult, ped = getCharPlayerIsTargeting(playerHandle)
local pedResult, id = sampGetPlayerIdByCharHandle(ped)
local lvl = sampGetPlayerScore(id)
if hendleResult and pedResult then playerid = id playerlvl = lvl end
if isKeyDown(VK_K and VK_L) and playerid then
sampSendChat(playerlvl)
end
Оно у меня прям флудит
 
Решение
Lua:
local hendleResult, ped = getCharPlayerIsTargeting(playerHandle)
local pedResult, id = sampGetPlayerIdByCharHandle(ped)
local lvl = sampGetPlayerScore(id)
if hendleResult and pedResult then
    playerid = id 
    playerlvl = lvl
end
if isKeyDown(VK_K) and isKeyJustPressed(VK_L) and playerid then
    sampSendChat(playerlvl)
end

Fott

Простреленный
3,446
2,307
Lua:
local hendleResult, ped = getCharPlayerIsTargeting(playerHandle)
local pedResult, id = sampGetPlayerIdByCharHandle(ped)
local lvl = sampGetPlayerScore(id)
if hendleResult and pedResult then
    playerid = id 
    playerlvl = lvl
end
if isKeyDown(VK_K) and isKeyJustPressed(VK_L) and playerid then
    sampSendChat(playerlvl)
end
 
  • Нравится
Реакции: vvvlvs

vvvlvs

Новичок
Автор темы
20
0
Lua:
local hendleResult, ped = getCharPlayerIsTargeting(playerHandle)
local pedResult, id = sampGetPlayerIdByCharHandle(ped)
local lvl = sampGetPlayerScore(id)
if hendleResult and pedResult then
    playerid = id
    playerlvl = lvl
end
if isKeyDown(VK_K) and isKeyJustPressed(VK_L) and playerid then
    sampSendChat(playerlvl)
end


Где посмотреть про клавиши пкм и тд? Я про VK_K и т д
 
Статус
В этой теме нельзя размещать новые ответы.