RemoveBuildingForPlayer

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:52, 13 September 2011
Megadreams (Talk | contribs)

← Previous diff
Revision as of 00:48, 19 September 2011
Smithy (Talk | contribs)
(Added parameters)
Next diff →
Line 6: Line 6:
{{AddedIn0.3d|function}} {{AddedIn0.3d|function}}
-{{Parameters|playerid}}+{{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|ID of the player that you want to remove the models for.}}
{{Param|modelid|The [[Game_Object_ID_List|model]] you want to remove.}} {{Param|modelid|The [[Game_Object_ID_List|model]] you want to remove.}}
Line 20: Line 20:
{ {
/* 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 get deleted within a range of 200.0
-from the points: 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;

Revision as of 00:48, 19 September 2011




Description:

Removes a standard San Andreas model for one 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)
playeridID of the player that you want to remove the models for.
modelidThe model you want to remove.
Float:fXThe X coordinate where you want to delete a model.
Float:fYThe Y coordinate where you want to delete a model.
Float:fZThe Z coordinate where you want to delete a model.
Float:fRadiusThe range the models needs to be deleted in.

Return Values:

This function does not return any specific values.


Example

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