File size: 1,304 Bytes
d7c5875 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | script_name("QuickMap")
script_author("FYP")
script_version("1.2")
script_description("allows to show game's map without opening the main menu")
script_properties("work-in-pause")
require "lib.moonloader"
--- Config
keyShow = VK_M
reduceZoom = true
function main()
local menuPtr = 0x00BA6748
while true do
wait(20)
if isPlayerPlaying(playerHandle) then
if isKeyCheckAvailable() and isKeyDown(keyShow) then
writeMemory(menuPtr + 0x33, 1, 1, false) -- activate menu
-- wait for a next frame
wait(0)
writeMemory(menuPtr + 0x15C, 1, 1, false) -- textures loaded
writeMemory(menuPtr + 0x15D, 1, 5, false) -- current menu
if reduceZoom then
writeMemory(menuPtr + 0x64, 4, representFloatAsInt(300.0), false)
end
while isKeyDown(keyShow) do
wait(80)
end
writeMemory(menuPtr + 0x32, 1, 1, false) -- close menu
end
end
end
end
--- Functions
function isKeyCheckAvailable()
if not isSampfuncsLoaded() then
return not isPauseMenuActive()
end
local result = not isSampfuncsConsoleActive() and not isPauseMenuActive()
if isSampLoaded() and isSampAvailable() then
result = result and not sampIsChatInputActive() and not sampIsDialogActive()
end
return result
end
|