Биндер

gg)

Участник
Автор темы
115
9
Нужна помощь. Нужно сделать так, что-бы биндер вводил айди по таргету персонажа (для команды /poison нужен айди)
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(200) end
while true do wait(0)
if isKeyDown(18) and isKeyJustPressed(49) then
sampSendChat('/poison')
end
end
end
 

mooh

Известный
177
54
Lua:
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(200) end
    while true do wait(0)
        if isKeyDown(18) and isKeyJustPressed(49) then
            local result, ped = getCharPlayerIsTargeting(PLAYER_PED)
            if result then
                local r, id = sampGetPlayerIdByCharHandle(ped)
                if r then
                    sampSendChat('/poison ' .. id)
                end
            end
        end
    end
end
 
  • Нравится
Реакции: gg)