11.12.2011, 22:25
Hello guys, well I Am trying to make command like /removeobject, that will remove object that is infront of the player. Is this possible, and how to do it?
CreateObject
DestroyObject
new Float ![]() RemoveBuildingForPlayer(playerid, modelid, x,y,z, 1); return 1; |
Well I am saying about natural objects, like the buildings from original San Andreas. Not the mapping objects. Like we have RemoveBuildingForPlayer <- I am talking about this.
|
new Float:x,Float:y,Float:z;
RemoveBuildingForPlayer(playerid, modelid, x,y+10,z, 5.0);
return 1;
new Float:playerpos[3];
GetPlayerPos(playerid, playerpos[0], playerpos[1], playerpos[2]);
for(new i=0; i<20000; i++) // Not sure what 20000 should be - it needs to be the highest possible object model id
{
RemoveBuildingForPlayer(playerid, i, playerpos[0], playerpos[1], playerpos[2], 50); // 50 = 50 meters around player
}
new Float ![]() GetPlayerPos(playerid, playerpos[0], playerpos[1], playerpos[2]); for(new i=0; i<20000; i++) // Not sure what 20000 should be - it needs to be the highest possible object model id { RemoveBuildingForPlayer(playerid, i, playerpos[0], playerpos[1], playerpos[2], 50); // 50 = 50 meters around player } |