Skip to content

Commit

Permalink
added readme and default heightmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
philip1337 committed Mar 2, 2017
1 parent 9d371af commit 01207e7
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Map Andreas Plugin #
This plugin was initiali made by Kalcor and extended bv Mauzen.
It allows you to load different height maps and check the min height for x,y coordinates.
You can us it as example for an anti cheat to detect airbreaks easier or to prevent falling through the ground.

## Features
- Load height map
- You can also implement it in your sampgdk plugins.

## Functions
|native|params|return|
|-------|-------|:-----:|
|MapAndreas_Init|mode, const name[]|int (0 failed/1 success)|
|MapAndreas_Unload|const name[], const message[]|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)|

- [Pawno include file: mapandreas.inc](include/mapandreas.inc)

### Example
Initialize MapAndreas and get a position.

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


## Build
#### Requirements
- [Modified version of gclient](https://github.com/timniederhausen/gclient)
- CMake >=3.1
- C++11
- debian package: libc6-dev-i386

Synchronize dependencies from [DEPS](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

- [How to use cmake](https://github.com/bast/cmake-example)

## License
- [License](LICENSE)
Binary file added heightmaps/SAfull.hmap
Binary file not shown.
Binary file added heightmaps/SAmin.hmap
Binary file not shown.

0 comments on commit 01207e7

Please sign in to comment.