- Версия SA-MP
-
- Любая
3D Terrain Radar
(radar3d.lua)
Pink (Horsi) - script | Pavel - map data
(radar3d.lua)
Pink (Horsi) - script | Pavel - map data
Q&A
What does this script do?
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?
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.
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.