slot0 = require("vector3d")
function _()
return false
end
slot1 = 110
slot2 = 5
slot3 = false
slot5 = false
slot6 = renderCreateFont("Century Gothic", 13, 10)
slot7 = false
slot8 = -1
slot9 = 21
slot10 = 0
slot11, slot12 = getScreenResolution()
function getTargetBlipCoordinatesFixed()
slot0, slot1, slot2, slot3 = getTargetBlipCoordinates()
if not slot0 then
return false
end
requestCollision(slot1, slot2)
loadScene(slot1, slot2, slot3)
slot8, slot9, slot10, slot11 = getTargetBlipCoordinates()
return slot4, slot5, slot6, slot7
end
require("lib.samp.events").onSendPlayerSync = function (slot0)
uv0 = math.sqrt(slot0.moveSpeed.x^2 + slot0.moveSpeed.y^2 + slot0.moveSpeed.z^2) * 140
if uv1 then
slot1.x = uv2 / 140
slot1.y = 0
slot1.z = -1
end
end
function secundomer()
print("1")
while true do
wait(0)
if uv0 == 1 then
wait(100)
printString(0 + 0.1, 2000)
elseif uv0 == 0 then
slot0 = 0
end
end
end
function main()
while not isSampAvailable() do
wait(0)
end
sampRegisterChatCommand("poehali", sup)
lua_thread.create(secundomer)
while true do
wait(0)
while uv0 do
wait(uv1)
uv2 = 1
isBlipExists, blipX, blipY, blipZ = getTargetBlipCoordinates()
if isBlipExists then
requestCollision(blipX, blipY)
blipZ = getGroundZFor3dCoord(blipX, blipY, blipZ)
blipZ = blipZ + 5.9855
else
sampAddChatMessage("ћетка на карте отсутствует", 6586937)
uv0 = false
freezeCharPositionAndDontLoadCollision(playerPed, false)
end
freezeCharPositionAndDontLoadCollision(playerPed, true)
slot0, slot1, slot2 = GetCoordinates()
vx = blipX - slot0
vy = blipY - slot1
vz = blipZ - slot2
slot3 = uv3(vx, vy, vz)
slot3:normalize()
teleportPlayer(slot0 + slot3.x * uv4, slot1 + slot3.y * uv4, slot2 + slot3.z * uv4)
slot11, slot12, slot13 = GetCoordinates()
mamagdeya = getDistanceBetweenCoords3d(blipX, blipY, blipZ, slot4, slot5, slot6)
if mamagdeya < uv4 then
wait(uv1)
teleportPlayer(blipX, blipY, blipZ)
uv0 = false
uv5 = false
uv2 = 0
freezeCharPositionAndDontLoadCollision(playerPed, false)
end
end
end
end
function sup()
uv0 = not uv0
if uv0 then
uv1 = 30
print("21")
end
sampAddChatMessage("летим в пизду с помощью скрипта отча¤вшегос¤ скриптера", -1)
isBlipExists, blipX, blipY, blipZ = getTargetBlipCoordinates()
if isBlipExists then
uv2 = true
else
sampAddChatMessage("ћетка на карте отсутствует", 6586937)
end
end
function SetAngle(slot0, slot1, slot2)
slot3, slot4, slot5 = GetCoordinates()
if isCharInAnyCar(playerPed) then
setCarHeading(storeCarCharIsInNoSave(playerPed), getHeadingFromVector2d(slot6, slot7))
else
setCharHeading(playerPed, slot8)
end
restoreCameraJumpcut()
end
function GetCoordinates()
if isCharInAnyCar(playerPed) then
return getCarCoordinates(storeCarCharIsInNoSave(playerPed))
else
return getOffsetFromCharInWorldCoords(playerPed, 0, 0, 0.2855)
end
end
function teleportPlayer(slot0, slot1, slot2)
if isCharInAnyCar(playerPed) then
setCharCoordinates(playerPed, slot0, slot1, slot2)
end
setCharCoordinatesDontResetAnim(playerPed, slot0, slot1, slot2)
end
function setCharCoordinatesDontResetAnim(slot0, slot1, slot2, slot3)
if doesCharExist(slot0) then
setEntityCoordinates(getCharPointer(slot0), slot1, slot2, slot3)
end
end
function setEntityCoordinates(slot0, slot1, slot2, slot3)
if slot0 ~= 0 and readMemory(slot0 + 20, 4, false) ~= 0 then
writeMemory(slot4 + 48 + 0, 4, representFloatAsInt(slot1), false)
writeMemory(slot4 + 48 + 4, 4, representFloatAsInt(slot2), false)
writeMemory(slot4 + 48 + 8, 4, representFloatAsInt(slot3), false)
end
end