Repository navigation
A3D_RemoveBuilding
Remove the map objects of a model around a point, as RemoveBuildingForPlayer does for what players see.
A removal may hold for one virtual world only. Physics objects resting on a removed map object wake up and fall.
native A3D_RemoveBuilding(modelid, Float:x, Float:y, Float:z, Float:radius, worldid = -1);| Parameter | Description | Default |
|---|---|---|
modelid |
Model to remove, or -1 for every model. |
|
Float:x |
Centre on the X axis. | |
Float:y |
Centre on the Y axis. | |
Float:z |
Centre on the Z axis. | |
Float:radius |
Distance from the centre to the position of the map objects. | |
worldid |
Virtual world they are removed in, or -1 for every world. |
-1 |
- The number of map objects removed.
Every map object whose position lies within radius of the centre is removed, of the model given or of any model with -1. The return value counts the ones removed by this call, so a map object already removed is not counted again.
- With
worldidset to-1, the map objects leave every world. - With a virtual world, only the bodies and queries of that world miss them. Call it once for each world that needs the removal.
Removals work at any time, also while players are in game. Physics objects resting on a removed map object wake up and fall.
The game still shows the building and collides players with it until RemoveBuildingForPlayer removes it for them, so call both. A call scans the 39,000 map objects of the game and costs about 0.2 milliseconds.
Clears the lamp posts of a square for a stage, for physics and for players.
public OnGameModeInit() {
A3D_RemoveBuilding(1226, 1700.0, -2500.0, 13.0, 30.0);
return 1;
}
public OnPlayerConnect(playerid) {
RemoveBuildingForPlayer(playerid, 1226, 1700.0, -2500.0, 13.0, 30.0);
return 1;
}-
A3D_RestoreBuilding: Bring back map objects removed by
A3D_RemoveBuilding. - A3D_IsPointInsideMap: Whether a point lies inside the collision of the map, such as a player who fell under the ground or into a closed model.
- A3D_CreateStaticObject: Create a physics object that never moves, shaped like the collision of a model.
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