Skip to content

Plugin wrapper allows you to load different height maps and check the min height for x, y coordinates.

Notifications You must be signed in to change notification settings

gsmj/PySAMP-mapandreas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

PySAMP-Map Andreas Plugin

This plugin was 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.

Functions

native params return
map_andreas_init mode, name: str int (0 failed/1 success)
map_andreas_unload name: str int (0 failed/1 success)
map_andreas_save_current_map name: str int (0 failed/1 success)
map_andreas_find_z_for_2d_coord x: float, y: float int (0 failed/1 success)
map_andreas_find_average_z x: float, y: float int (0 failed/1 success)
map_andreas_set_z_for_2d_coord x: float, y: float, z: float int (0 failed/1 success)

Installation

Move pymapandreas to the server folder:

from pymapandreas.mapandreas import MapAndreas

Example

Initialize MapAndreas and get a position.

from pysamp import on_gamemode_init
from pymapandreas.mapandreas import MapAndreas
from pymapandreas.modes import MapAndreasMode

@on_gamemode_init
def on_ready():
    map_andreas = MapAndreas(MapAndreasMode.MODE_FULL, "scriptfiles/SAFull.hmap")
    if map_andreas.find_average_z(20.001, 25.006):
        print("Found")

About

Plugin wrapper allows you to load different height maps and check the min height for x, y coordinates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages