Repository navigation
A3D_IsPointOnScreen
imshooter edited this page Oct 17, 2026
·
1 revision
Whether a point shows on the screen of a player.
native bool:A3D_IsPointOnScreen(playerid, Float:x, Float:y, Float:z, bool:sight = false);| Parameter | Description | Default |
|---|---|---|
playerid |
Player whose screen it is. | |
Float:x |
Point on the X axis. | |
Float:y |
Point on the Y axis. | |
Float:z |
Point on the Z axis. | |
bool:sight |
Whether the camera must see it, with the map and static objects in the way. | false |
-
truewhen the point shows. -
falsewhen it does not, or the player sent no camera yet.
The point shows when it lies in front of the camera and inside the 640 by 448 units of the screen. With sight, the line from the camera to the point must also be free of the map and of static objects, in the virtual world of the player.
Rewards a player who spots a hidden package.
stock CheckPackage(playerid, Float:x, Float:y, Float:z) {
if (GetPlayerDistanceFromPoint(playerid, x, y, z) > 30.0) {
return;
}
if (!A3D_IsPointOnScreen(playerid, x, y, z, true)) {
return;
}
SendClientMessage(playerid, -1, "You spotted a package.");
}- A3D_WorldToScreen: Find where a point of the world shows on the screen of a player.
- A3D_IsLineOfSight: Whether nothing stands between two points.
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