- 103
- 11
Здаров, чёт захотел сделать авто шот на луа, как всегда где-то накосячил.
Код:
Код:
Lua:
script_name(autoshot)
script_author(Lagren)
script_dependencies(Cleo)
script_version("v1.0")
require "lib.moonloader"
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable()
do
wait(400)
end
while true do
for id = 0, sampGetMaxPlayerId(true)
do
if sampIsPlayerConnected(id)
then
local exists, handle = sampGetCharHandleBySampPlayerId(id)
if exists and doesCharExist(handle) then
if isCharOnScreen(handle) then
if
isPlayerTargettingChar(handle, playerPed)
then
setPlayerFireButton(playerHandle, true)
end
end
end
end
end
end
end