require("lib.sampfuncs")
require("lib.moonloader")
slot0 = require("lib.samp.events")
slot1 = false
slot2 = -1
slot3 = 0
slot4 = 0
slot5 = 0
slot6 = false
function reset()
uv0 = false
uv1 = 0
uv2 = 0
uv3 = 0
end
function main()
while not isSampAvailable() do
wait(0)
end
sampRegisterChatCommand("dm", function (slot0)
if slot0 == "" then
reset()
return
end
if uv0 then
sampAddChatMessage("LUA: \\xc2\\xfb \\xf3\\xe6\\xe5 \\xe0\\xea\\xf2\\xe8\\xe2\\xe8\\xf0\\xee\\xe2\\xe0\\xeb\\xe8 \\xe4\\xe0\\xec\\xe0\\xe3\\xe5\\xf0. \\xc2\\xe2\\xe5\\xe4\\xe8\\xf2\\xe5 {FFFF00}/dm{007FFF} \\xe5\\xf9\\xe5 \\xf0\\xe0\\xe7 \\xe4\\xeb\\xff \\xe4\\xe5\\xe0\\xea\\xf2\\xe8\\xe2\\xe0\\xf6\\xe8\\xe8.", 32767)
return
end
uv0 = true
uv1 = tonumber(slot0)
lua_thread.create(function ()
while true do
if not uv0 then
break
end
slot3 = 0
sampSendGiveDamage(uv1, 7, slot3, 3)
for slot3 = 1, 10 do
setGameKeyState(17, 255)
wait(1)
end
sampSendGiveDamage(uv1, 7, 0, 3)
wait(500)
end
reset()
end)
end)
function uv2.onSendPlayerSync(slot0)
if uv0 then
slot1, slot2 = sampGetCharHandleBySampPlayerId(uv1)
if slot1 then
slot3, slot4, slot5 = getCharCoordinates(slot2)
slot6 = -1
if ((uv2 == 0 or uv3 == 0 or uv4 == 0) and 0 or math.sqrt((slot3 - uv2)^2 + (slot4 - uv3)^2 + (slot5 - uv4)^2)) > 50 then
reset()
sampAddChatMessage("LUA: \\xc8\\xe3\\xf0\\xee\\xea \\xef\\xe5\\xf0\\xe5\\xe4\\xe2\\xe8\\xe3\\xe0\\xe5\\xf2\\xf1\\xff \\xf1\\xeb\\xe8\\xf8\\xea\\xee\\xec \\xe1\\xfb\\xf1\\xf2\\xf0\\xee, \\xe4\\xe0\\xec\\xe0\\xe3\\xe5\\xf0 \\xe0\\xe2\\xf2\\xee\\xec\\xe0\\xf2\\xe8\\xf7\\xe5\\xf1\\xea\\xe8 \\xe2\\xfb\\xea\\xeb\\xfe\\xf7\\xe5\\xed.", 32767)
end
slot0.position.x = slot3
slot0.position.y = slot4
slot0.position.z = slot5 - 2
uv2 = slot3
uv3 = slot4
uv4 = slot5
if getCharHealth(slot2) == 0 then
reset()
sampAddChatMessage("LUA: \\xc8\\xe3\\xf0\\xee\\xea {FFFF00}" .. sampGetPlayerNickname(uv1) .. "{007FFF} [ID {FFFF00}" .. uv1 .. "{007FFF}] \\xf3\\xe1\\xe8\\xf2.", 32767)
end
else
sampAddChatMessage("LUA: \\xc8\\xe3\\xf0\\xee\\xea \\xed\\xe5\\xe4\\xee\\xf1\\xf2\\xf3\\xef\\xe5\\xed, \\xe4\\xe0\\xec\\xe0\\xe3\\xe5\\xf0 \\xe0\\xe2\\xf2\\xee\\xec\\xe0\\xf2\\xe8\\xf7\\xe5\\xf1\\xea\\xe8 \\xe2\\xfb\\xea\\xeb\\xfe\\xf7\\xe5\\xed.", 32767)
reset()
end
end
end
sampRegisterChatCommand("sdm", function ()
uv0 = not uv0
sampAddChatMessage("LUA: \\xc0\\xed\\xf2\\xe8\\xf1\\xeb\\xe0\\xef\\xef\\xe5\\xf0 " .. (uv0 and "{00CC00}\\xe0\\xea\\xf2\\xe8\\xe2\\xe8\\xf0\\xee\\xe2\\xe0\\xed" or "{CC0000}\\xe4\\xe5\\xe0\\xea\\xf2\\xe8\\xe2\\xe8\\xf0\\xee\\xe2\\xe0\\xed") .. "{007FFF}.", 32767)
end)
function uv2.onSetPlayerPos(slot0)
slot1, slot2, slot3 = getCharCoordinates(PLAYER_PED)
slot4 = math.sqrt((slot1 - slot0.x)^2 + (slot2 - slot0.y)^2 + (slot3 - slot0.z)^2)
if uv0 and slot4 > 1 and slot4 < 50 then
sampAddChatMessage("LUA: \\xc0\\xe4\\xec\\xe8\\xed \\xef\\xee\\xef\\xfb\\xf2\\xe0\\xeb\\xf1\\xff \\xf1\\xeb\\xe0\\xef\\xed\\xf3\\xf2\\xfc \\xe2\\xe0\\xf1.", 32767)
return false
end
end
end