Repository navigation
A3D_GetMaterialFlags
imshooter edited this page Oct 17, 2026
·
1 revision
Find what the game says of a surface, such as whether bullets pass through it or it is sand, glass or stairs.
native A3D_MATERIAL:A3D_GetMaterialFlags(material);| Parameter | Description |
|---|---|
material |
Surface to read. |
- The flags of the surface.
-
A3D_MATERIAL:0when there is no such surface, or the database has no surfaces.
Each flag is a column of surfinfo.dat that is not zero for the surface. Surfaces lists the flags of every surface. The ones scripts use most:
| Flag | Meaning |
|---|---|
A3D_MATERIAL_SHOOT_THROUGH |
Bullets pass through, as through a chain fence. |
A3D_MATERIAL_SEE_THROUGH |
Sight passes through, as through a fence or glass. |
A3D_MATERIAL_GLASS |
The surface is glass. |
A3D_MATERIAL_STAIRS |
The surface is a step of stairs. |
A3D_MATERIAL_SAND |
The surface is sand. |
A3D_MATERIAL_WATER |
The surface is water, such as a fountain. |
A3D_MATERIAL_NO_SPRINT |
Players cannot sprint on it. |
A3D_MATERIAL_CLIMBABLE |
Players can climb it. |
A shot that goes through chain fences and stops at the first wall.
stock bool:GetShotEnd(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:endX, &Float:endY, &Float:endZ) {
new
Float:x[16],
Float:y[16],
Float:z[16],
A3D_HIT:types[16],
hitids[16],
materials[16],
count = A3D_RayCastAll(x1, y1, z1, x2, y2, z2, x, y, z, types, hitids, materials)
;
for (new i; i != count; ++i) {
if ((A3D_GetMaterialFlags(materials[i]) & A3D_MATERIAL_SHOOT_THROUGH) != A3D_MATERIAL:0) {
continue;
}
endX = x[i];
endY = y[i];
endZ = z[i];
return true;
}
return false;
}-
A3D_GetMaterialName: Find the name the game gives a surface, such as
TARMACorGRASS_SHORT_LUSH. - A3D_RayCastAll: Find everything a segment hits, nearest first.
3DAndreas 0.7.0 · 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