RemoveBuildingForPlayer
From SA-MP Wiki
Description:
Removes a standard San Andreas model for a single player within a specified range.
(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
playerid | The ID of the player to remove the objects for. |
modelid | The model to remove. |
Float:fX | The X coordinate around which the objects will be removed. |
Float:fY | The Y coordinate around which the objects will be removed. |
Float:fZ | The Z coordinate around which the objects will be removed. |
Float:fRadius | The radius around the specified point to remove objects with the specified model. |
Return Values:
This function does not return any specific values.
Example Usage:
public OnPlayerConnect(playerid) { // When the player connects, objects with model 615 will be removed within a // range of 200.0 from the point 0.0, 0.0, 0.0, which is the center of San Andreas. RemoveBuildingForPlayer(playerid, 615, 0.0, 0.0, 0.0, 200.0); return 1; }
Note | In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. |
Example Usage:
public OnPlayerConnect(playerid) { // When the player connects, all map objects will be removed. RemoveBuildingForPlayer(playerid, -1, 0.0, 0.0, 0.0, 6000.0); return 1; }
External Links
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- DestroyObject: Destroy an object.
- DestroyPlayerObject: Destroy a player object.