Lua HUD 3D Terrain Radar

Horsi

Участник
Автор темы
11
87
Версия SA-MP
  1. Любая
3D Terrain Radar
(radar3d.lua)
Pink (Horsi) - script | Pavel - map data

Q&A

What does this script do?
4RBjdQH.png

It displays a 3D projection of the surrounding terrain in a radar style. Because it resembles normal radar function, player position is being shown also, as well as the direction player is looking at.

How to use it?
Put radar3d.lua into /moonloader/ folder and heightmap.txt into /moonloader/lib/ folder. Enable/disable with //3dradar command.

What libraries do i need? (dependencies)
Other than script itself you only need map file in .txt form. The script uses ffi which is built in.

Can it display SAMP objects?
No. The terrain data is stored locally in a .txt file which was read by Pavel from original singleplayer GTA:SA map. This script does not check collisions in real time.

How useful can it be?
OLYVVw6.png

Borderline useful at best. It can be used by snipers, maybe, and by pilots. Maybe by moderators. You tell me.

Is it configurable?
Yes, you can change colors and opacity, position and scaling in all directions by first trying out values with //3dradarset and then hardcoding preferred values into the script to save them. Read code comments for more info.

Are in-game changed settings saved?
No, the settings and/or ini files are not being created.

Can resolution be increased?
At this configuration, not by a lot. The line rendering starts to break when ~30 lines are being exceeded.

Does it rotate with me like regular radar?
No. The map rotation stays fixed, the direction camera is looking at is displayed by a lighthouse-styled marker projected on base along with projections of player positions hovering above it.

Why is the direction marker disappearing when the original radar is off?
Because the script is reading the value of CRadar class, it is inactive when radar is off. This is normal.

Why the display is it so short?
Because the map has very big height differences such as Chilliad next to a flat ground, Z height has to be scaled down for everything to fit. You can change scaling by //3dradarset /set/zscaledown [2.0 = default].

The script won't run.
ykuWqlF.png

Does it crash? If not: Does SF log say : failed to load map file? Get the .txt map file into the moonloader/lib/ folder.
If yes: post moonloader log please.

Display looks all weird.
What is your resolution? I tested only at 1920x1080, but it should run on other resolutions too. Try to change some of the settings if this won't solve it, post your problem.
 

Вложения

  • radar3d.lua
    10.3 KB · Просмотры: 262
  • heightmap.7z
    939.6 KB · Просмотры: 221
У

Удалённый пользователь 439480

Гость
nice work! "Eats" a lot of FPS?

Кому лень переводить в переводчике:
Как использовать?
- Установить Radar3d.lua в папку /moonloader heightmap.txt в папку /moonloader/lib/.

Скрипт настраивается?
- Да. Настроить можно по команде //3dradar.

Сохраняются ли настройки?
- Увы, нет.

Проекция вращается вместе с игроком как радар?
- Нет, положение камеры показывается маркером сверху.

Почему маркер направления исчезает, когда исходный радар выключен?
- Поскольку скрипт считывает значение класса CRadar, он неактивен, когда радар выключен.

Скрипт не работает.
- Проверьте консоль SampFuncs, если там написано "failed to load map file", установите файл карты .txt в папку moonloader/lib/.

Выглядит странно на моём разрешении экрана.
- Зависит от Вашего разрешения. Я пробовал на 1920x1080, но должно работать и на других. Попробуйте изменить некоторые настройки, если это не решит проблему, напишите о своей проблеме.
 
  • Нравится
Реакции: Bene // и MAHEKEH

Rapture

Потрачен
1,067
293
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
теперь буду в кораблики играть
2022-06-15_00-42-33.png
 

myadekey

Известный
252
60
мне кажется стоит перенести мод в читы, это от части вх
 

jenqqq

Активный
163
62
3D Terrain Radar
(radar3d.lua)
Pink (Horsi) - script | Pavel - map data

Q&A

What does this script do?
4RBjdQH.png

It displays a 3D projection of the surrounding terrain in a radar style. Because it resembles normal radar function, player position is being shown also, as well as the direction player is looking at.

How to use it?
Put radar3d.lua into /moonloader/ folder and heightmap.txt into /moonloader/lib/ folder. Enable/disable with //3dradar command.

What libraries do i need? (dependencies)
Other than script itself you only need map file in .txt form. The script uses ffi which is built in.

Can it display SAMP objects?
No. The terrain data is stored locally in a .txt file which was read by Pavel from original singleplayer GTA:SA map. This script does not check collisions in real time.

How useful can it be?
OLYVVw6.png

Borderline useful at best. It can be used by snipers, maybe, and by pilots. Maybe by moderators. You tell me.

Is it configurable?
Yes, you can change colors and opacity, position and scaling in all directions by first trying out values with //3dradarset and then hardcoding preferred values into the script to save them. Read code comments for more info.

Are in-game changed settings saved?
No, the settings and/or ini files are not being created.

Can resolution be increased?
At this configuration, not by a lot. The line rendering starts to break when ~30 lines are being exceeded.

Does it rotate with me like regular radar?
No. The map rotation stays fixed, the direction camera is looking at is displayed by a lighthouse-styled marker projected on base along with projections of player positions hovering above it.

Why is the direction marker disappearing when the original radar is off?
Because the script is reading the value of CRadar class, it is inactive when radar is off. This is normal.

Why the display is it so short?
Because the map has very big height differences such as Chilliad next to a flat ground, Z height has to be scaled down for everything to fit. You can change scaling by //3dradarset /set/zscaledown [2.0 = default].

The script won't run.
ykuWqlF.png

Does it crash? If not: Does SF log say : failed to load map file? Get the .txt map file into the moonloader/lib/ folder.
If yes: post moonloader log please.

Display looks all weird.
What is your resolution? I tested only at 1920x1080, but it should run on other resolutions too. Try to change some of the settings if this won't solve it, post your problem.
goes dummy!
awesome
 

myadekey

Известный
252
60
Обычный радар тоже отображает игроков/транспорт. Тут это просто взамен квадратиков и треугольничков заменено на более похожую штуку.
эта штука показывает и игроков, которых ты не можешь увидеть(например, стоит за стеной)
 

Horsi

Участник
Автор темы
11
87
nice work! "Eats" a lot of FPS?
Not really, i am seeing increased GPU and CPU usage, but FPS is still near 100. It might be a problem for older laptops though.

Не думаю, что кто-то будет это юзать в замену обычному вх. Хотя забанить за такой радар могут
Для серверов со скрытыми игроками, например, в прятки, зомби или Battle Royale, это будет считаться чит. ~Google Translate