local hook = require("lib.samp.events")
require("lib.moonloader")
function hook.onSetPlayerPos(pos)
local myPos = {getCharCoordinates(1)}
if myPos[1] == pos.x and myPos[2] == pos.y and myPos[3] ~= pos.z then
pressZ()
end
end
function hook.onServerMessage(color, text)
if text:find("телепортировал вас") then
pressZ()
end
end
function pressZ()
lua_thread.create(function()
setVirtualKeyDown(VK_Z, true)
wait(50)
setVirtualKeyDown(VK_Z, false)
end)
end