Skip to content

A3D_RestoreBuilding

imshooter edited this page Oct 17, 2026 · 1 revision

Bring back map objects removed by A3D_RemoveBuilding.

Restoring for every world undoes every removal of a map object. A map object removed for every world comes back only when it is restored for every world.

native A3D_RestoreBuilding(modelid, Float:x, Float:y, Float:z, Float:radius, worldid = -1);

Parameters

Parameter Description Default
modelid Model to bring back, 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 come back in, or -1 for every world. -1

Returns

  • The number of map objects brought back.

Remarks

  • Restoring for every world, -1, undoes every removal of the map objects found, for every world and for single worlds.
  • Restoring for one world undoes the removal of that world only. A map object removed for every world stays removed until it is restored for every world.

Physics objects around a restored map object wake up, so they meet it again.

The game has no way to bring a building back for a player, who sees it removed until they reconnect. Restoring suits removals made for physics only, or for a virtual world nobody will see the building in again.

Example

Opens a wall of a world for an event and closes it when the event ends.

#define EVENT_WORLD 7

stock StartEvent() {
    A3D_RemoveBuilding(-1, 1700.0, -2500.0, 13.0, 5.0, EVENT_WORLD);
}

stock EndEvent() {
    A3D_RestoreBuilding(-1, 1700.0, -2500.0, 13.0, 5.0, EVENT_WORLD);
}

Related

  • A3D_RemoveBuilding: Remove the map objects of a model around a point, as RemoveBuildingForPlayer does for what players see.

Home

Guides

Reference

Functions

Creating objects
Motion
Placement
Behaviour
Display and data
Rays
Shapes
Players, vehicles and actors
Map probes
Screen
Map objects
Water
Models and surfaces
Rotations and offsets
Vehicles
Routes
Route display
Walking
Callbacks

Clone this wiki locally