script_name("arizona helper 2.0")
script_description("arizona helper 2.0")
local ev = require("samp.events")
local sampev = require 'lib.samp.events'
local meshochki = {0,0,0}
local zapiscords = {0,0,0}
local step = 5
local time = 1000
local x = zapiscords[1]
local y = zapiscords[2]
local z = zapiscords[3]
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage("{ff0008}[sss]: {0dff00}SSSS", -1)
sampRegisterChatCommand('ses',meshok)
thr = lua_thread.create_suspended(potok)
while true do wait(100)
end
end
function sampev.onServerMessage(color, text)
if text:find("текст") then
end
end
function ev.onSetRaceCheckpoint(type, pos, nextPos, size)
end
function ev.onSetCheckpoint(pos, radius)
end
function meshok()
zapiscord()
coordMasterr()
end
local vector = require("vector3d")
function coordMasterr(x, y, z, step, time)
local pos = {x, y, z}
local char = {getCharCoordinates(PLAYER_PED)}
while getDistanceBetweenCoords3d(char[1], char[2], char[3], pos[1], pos[2], pos[3]) >= step do
local vector = vector(pos[1] - char[1], pos[2] - char[2], pos[3] - char[3])
vector:normalize()
char[1] = char[1] + vector.x * step
char[2] = char[2] + vector.y * step
char[3] = char[3] + vector.z * step
wait(time)
setCharCoordinates(1, char[1], char[2], char[3])
end
sampAddChatMessage("Телепортировались!",-1)
end
function sampev.onCreatePickup(id, model, pickupType, position)
meshochki = {position.x, position.y, position.z}
end
function zapiscord()
zapiscords = {meshochki[1],meshochki[2],meshochki[3]}
end