- 231
- 49
- Версия MoonLoader
- .026-beta
Почему чекпоинт спавниться вокруг игрока, но не перед ним
Lua:
require('lib.samp.events').onSendCommand = function(cmd)
if cmd == '/tes' then
if hand then
deleteCheckpoint(hand) end
local dist, grad = 3, 180
local angle, x, y, z = getCharHeading(1), getCharCoordinates(1)
local cx = x + (dist * math.sin(math.deg(-angle + grad)))
local cy = y + (dist * math.cos(math.deg(-angle + grad)))
local cz = z + 1
hand = createCheckpoint(1, cx, cy, cz, 1, 1, 1, 1)
return false
end
end
function onScriptTerminate(script, quitGame)
if script == thisScript() then
deleteCheckpoint(hand)
end
end