RemoveBuildingForPlayer

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:48, 19 September 2011
Smithy (Talk | contribs)
(Added parameters)
← Previous diff
Revision as of 23:09, 30 November 2011
Smithy (Talk | contribs)

Next diff →
Line 2: Line 2:
{{Title}} {{Title}}
-{{Description|Removes a standard San Andreas model for one player within a specified range.}}+{{Description|Removes a standard San Andreas model for a single player within a specified range.}}
{{AddedIn0.3d|function}} {{AddedIn0.3d|function}}
{{Parameters|playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius}} {{Parameters|playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius}}
-{{Param|playerid|ID of the player that you want to remove the models for.}}+{{Param|playerid|The ID of the player to remove the objects for.}}
-{{Param|modelid|The [[Game_Object_ID_List|model]] you want to remove.}}+{{Param|modelid|The [[Game_Object_ID_List|model]] to remove.}}
-{{Param|Float:fX|The X coordinate where you want to delete a model.}}+{{Param|Float:fX|The X coordinate around which the objects will be removed.}}
-{{Param|Float:fY|The Y coordinate where you want to delete a model.}}+{{Param|Float:fY|The Y coordinate around which the objects will be removed.}}
-{{Param|Float:fZ|The Z coordinate where you want to delete a model.}}+{{Param|Float:fZ|The Z coordinate around which the objects will be removed.}}
-{{Param|Float:fRadius|The range the models needs to be deleted in.}}+{{Param|Float:fRadius|The radius. Objects within this radius from the coordinates above will be removed.}}
{{NoReturn}} {{NoReturn}}
-<h3>Example</h3> 
<pawn> <pawn>
public OnPlayerConnect(playerid) public OnPlayerConnect(playerid)
{ {
- /* When the player connects model "615" which is veg_tree3 will get deleted within a range of 200.0 + /* When the player connects model "615" which is veg_tree3 will be deleted within a range of 200.0
-from the point: 0.0, 0.0, 0.0 which is the center of San Andreas. */+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); RemoveBuildingForPlayer(playerid, 615, 0.0, 0.0, 0.0, 200.0);
return 1; return 1;
} }
</pawn> </pawn>
 +
 +{{RelatedFunctions}}
 +{{DestroyObject}}
[[Category:Scripting Functions]] [[Category:Scripting Functions]]

Revision as of 23:09, 30 November 2011




Description:

Removes a standard San Andreas model for a single player within a specified range.


RemoveBuildingForPlayer was added in SA-MP 0.3d This function was added in SA-MP 0.3d and will not work in earlier versions!


Parameters:
(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
playeridThe ID of the player to remove the objects for.
modelidThe model to remove.
Float:fXThe X coordinate around which the objects will be removed.
Float:fYThe Y coordinate around which the objects will be removed.
Float:fZThe Z coordinate around which the objects will be removed.
Float:fRadiusThe radius. Objects within this radius from the coordinates above will be removed.

Return Values:

This function does not return any specific values.


public OnPlayerConnect(playerid)
{
    /* When the player connects model "615" which is veg_tree3 will be deleted 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;
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.

Personal tools