- 135
- 13
- Версия MoonLoader
- .026-beta
Lua:
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if on == 1 then
if dialogId == 248 then
if text == '{FFFFFF}Тут пусто' then
if button2 == 'Закрыть' then
lua_thread.create(function()
wait(math.random(1000, 2000))
sampSendDialogResponse(248, 1, nil, nil)
end)
else
lua_thread.create(function()
wait(math.random(1000,2000))
sampSendDialogResponse(248, 0, nil, nil)
wait(3000 + math.random(7777))
local randott = math.random(1, #ott)
runToPoint(ott[randott][1], ott[randott][2])
local randdoo = math.random(1, #doo)
runToPoint(doo[randdoo][1], doo[randdoo][2])
end)
end
end
end
end
end
function runToPoint(tox, toy)
local x, y, _ = getCharCoordinates(PLAYER_PED)
local angle = getHeadingFromVector2d(tox - x, toy - y)
local xAngle = math.random(-50, 50)/100
setCameraPositionUnfixed(xAngle, math.rad(angle - 90))
stopRun = false
while getDistanceBetweenCoords2d(x, y, tox, toy) > 0.8 do
setGameKeyState(1, -255)
--setGameKeyState(16, 1)
wait(1)
x, y, z = getCharCoordinates(PLAYER_PED)
angle = getHeadingFromVector2d(tox - x, toy - y)
setCameraPositionUnfixed(xAngle, math.rad(angle - 90))
if stopRun then
stopRun = false
break
end
end
end
Lua:
ott = {{123, -222}, --[[и т.д.]]}
doo = {{-3534, 333}, --[[и т.д.]]}
Последнее редактирование: