--Author Drags - Ne smey prodavat eto public melkiy ti pidor(esli prodayosh)
local sampev = require("samp.events")
require("addon")
local mode = 2
local state = 0
local x2, y2, z2 = 0, 0, 0
local x, y, z = 0, 0, 0
local speedv = -0.1
local b = 0
local need_speed = false
local need_speed_f = false
function FailBot()
if state == 1 then
if z2 ~= z then
if z2 >= z then z = z2 end
z = z + speedv
need_speed_f = true
setBotPosition(x, y, z)
updateSync()
need_speed_f = false
if z2 >= z then
b = x2 + 1
speedv = -0.1
setBotPosition(x2, y2, z2)
updateSync()
state = 2
end
end
end
if state == 2 then
if x2 <= b then
x2 = x2 + 0.2
need_speed = true
setBotPosition(x2, y2, z2)
updateSync()
need_speed = false
else
state = 0
end
end
end
function sampev.onSendPlayerSync(data)
if need_speed == true then data.moveSpeed.z = 0.05 end
if need_speed_f == true then
local spz = speedv / 5
data.moveSpeed.z = spz
speedv = speedv - 0.8
if speedv < - 0.8 then
speedv = -0.8
end
end
end
function onRunCommand(cmd)
local args = {}
for arg in cmd:gmatch("%S+") do
table.insert(args, arg)
end
if args[1] == '!slapmode' then
local arg = args[2]
if arg == nil then
print('Select mode: 1 - if you stay afk | 2 - for emulate slap')
return false
end
if arg == "1" or arg == "2" then
mode = tonumber(arg)
print("Current mode - "..arg)
else
print('Select mode: 1 - if you stay afk | 2 - for emulate slap')
end
return false
end
end
function onLoad()
newTask(function()
while true do
FailBot()
wait(90)
end
end)
end
function sampev.onSetPlayerPos(pos)
x = pos.x
y = pos.y
z = pos.z
local px, py, pz = getBotPosition()
if px == x and py == y and pz ~= z and state == 0 then
if mode == 2 then
print("Slapped")
x2, y2, z2 = getBotPosition()
state = 1
elseif mode == 1 then
print("Ignore slap")
return false
end
end
end
--Author Drags - Ne smey prodavat eto public melkiy ti pidor(esli prodayosh)
local sampev = require("samp.events")
require("addon")
local mode = 2
local state = 0
local x2, y2, z2 = 0, 0, 0
local x, y, z = 0, 0, 0
local speedv = -0.1
local b = 0
local need_speed = false
local need_speed_f = false
function FailBot()
if state == 1 then
if z2 ~= z then
if z2 >= z then z = z2 end
z = z + speedv
need_speed_f = true
setBotPosition(x, y, z)
updateSync()
need_speed_f = false
if z2 >= z then
b = x2 + 1
speedv = -0.1
setBotPosition(x2, y2, z2)
updateSync()
state = 2
end
end
end
if state == 2 then
if x2 <= b then
x2 = x2 + 0.2
need_speed = true
setBotPosition(x2, y2, z2)
updateSync()
need_speed = false
else
state = 0
end
end
end
function sampev.onSendPlayerSync(data)
if need_speed == true then data.moveSpeed.z = 0.05 end
if need_speed_f == true then
local spz = speedv / 5
data.moveSpeed.z = spz
speedv = speedv - 0.8
if speedv < - 0.8 then
speedv = -0.8
end
end
end
function onRunCommand(cmd)
local args = {}
for arg in cmd:gmatch("%S+") do
table.insert(args, arg)
end
if args[1] == '!slapmode' then
local arg = args[2]
if arg == nil then
print('Select mode: 1 - if you stay afk | 2 - for emulate slap')
return false
end
if arg == "1" or arg == "2" then
mode = tonumber(arg)
print("Current mode - "..arg)
else
print('Select mode: 1 - if you stay afk | 2 - for emulate slap')
end
return false
end
end
function onLoad()
newTask(function()
while true do
FailBot()
wait(90)
end
end)
end
function sampev.onSetPlayerPos(pos)
x = pos.x
y = pos.y
z = pos.z
local px, py, pz = getBotPosition()
if px == x and py == y and pz ~= z and state == 0 then
if mode == 2 then
print("Slapped")
x2, y2, z2 = getBotPosition()
state = 1
elseif mode == 1 then
print("Ignore slap")
return false
end
end
end
в блокнот записываешь slapfix.lua и кидаешь в папку script