script_name("Radar Zoom")
script_author("stool")
script_version("0.1")
require "lib.moonloader"
local mult = 1.0
function prnt(text)
sampAddChatMessage("{ffbc47}RZoom {a1762b}» {fcd186}" .. text, -1)
end
function main()
if not isSampLoaded() then return end
while not isSampAvailable() do wait(0) end
rad_zoom = representIntAsFloat(readMemory(0x586c9b, 4, true))
prnt("{ffbc47}[v0.1] {fcd186}Загружен. Используйте {ffbc47}Z {fcd186}и {ffbc47}X{fcd186} для смены масштаба радара.")
prnt("Автор скрипта: {ffbc47}stool {fcd186}BH:{ffbc47}540379 {fcd186}tg:{ffbc47}@sto_ol")
while true do
wait(0)
if not sampIsCursorActive() then
rad_zoom = representIntAsFloat(readMemory(0x586c9b, 4, true))
if isKeyDown(VK_Z) then
writeMemory(0x586c9b, 4, representFloatAsInt(rad_zoom+mult), true)
end
if isKeyDown(VK_X) then
writeMemory(0x586c9b, 4, representFloatAsInt(rad_zoom-mult), true)
end
end
end
end