Repository navigation
A3D_GetWaterLevel
imshooter edited this page Oct 17, 2026
·
1 revision
Find the height of the water at a point of the map.
Where two pools cover the point, the higher one counts. Past the edges of the map lies the sea at 0.0, as in the game. The level is that of calm water, without waves.
native bool:A3D_GetWaterLevel(Float:x, Float:y, &Float:level);| Parameter | Description |
|---|---|
Float:x |
Point on the X axis. |
Float:y |
Point on the Y axis. |
&Float:level |
Height of the surface of the water. |
-
truewhen water covers the point. -
falsewhen no water covers it, or the database has no water.
The water is the 307 polygons of water.dat in the map database. The level ignores what stands over the point, so a point under a roof or inside a building near a pool still gets the level of the pool. A3D_IsPointInWater checks that the point really is in the water.
A call costs about 0.2 microseconds.
Puts a boat on the water where a player stands on a pier.
stock SpawnBoatHere(playerid) {
new
Float:x,
Float:y,
Float:z,
Float:level
;
GetPlayerPos(playerid, x, y, z);
if (!A3D_GetWaterLevel(x, y, level)) {
return INVALID_VEHICLE_ID;
}
return CreateVehicle(473, x, y, level + 0.5, 0.0, -1, -1, 60);
}- A3D_IsPointInWater: Whether a point lies in the water of the map.
- A3D_SetBuoyancy: Make a moving physics object float in the water of the map.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions