Skip to content

Marevin/samp-plugin-mapandreas

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map Andreas Plugin

sampctl

This plugin was initially made by Kalcor and extended bv Mauzen.

It allows you to load different height maps and check the mininum height for any given (x,y) coordinates.
You can use it, for example, to prevent a player from falling through the ground or in an anti-cheat to detect airbreaks easier.

Forum threads about this plugin:

Functions

native params return
MapAndreas_Init mode, const name[] int (0 failed/1 success)
MapAndreas_Unload n/a int (0 failed/1 success)
MapAndreas_SaveCurrentHMap const name[] int (0 failed/1 success)
MapAndreas_FindZ_For2DCoord Float:X, Float:Y, &Float:Z int (0 failed/1 success)
MapAndreas_FindAverageZ Float:X, Float:Y, &Float:Z int (0 failed/1 success)
MapAndreas_SetZ_For2DCoord Float:X, Float:Y, Float:Z int (0 failed/1 success)

Installation

Simply install to your project:

sampctl package install philip1337/samp-plugin-mapandreas

Include in your code and begin using the library:

#include <mapandreas>

Example

Initialize MapAndreas and get a position.

public OnGameModeInit()
{
    MapAndreas_Init(MAP_ANDREAS_MODE_FULL, "scriptfiles/SAFull.hmap");
	
    new Float:pos;
	
    if (MapAndreas_FindAverageZ(20.001, 25.006, pos))
    {
        // Found position - Z coordinate saved in 'pos' variable
    }		
    return 0;
}

Build

Requirements

Synchronize dependencies from DEPS File.

gclient.py sync -v -f

You can also download it manually and place it into the external directory.

mkdir build
cd build
cmake ..\samp-log-spdlog
make

About

MapAndreas Plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 65.2%
  • CMake 24.8%
  • C 4.5%
  • Pawn 4.3%
  • Python 1.2%