Problem with RemoveBuilding?
#1

Hello, i didnt use the forum for a long time, but im obliged to ask a slightly silly question.

I will explain what happens, yesterday, i was trying to remove 4 streets in Idlewood, but they dont work with 'RemoveBuilding', that is, i used it like this:

Code:
	RemoveBuildingForPlayer(playerid, 5544, 1873.7422, -1682.4766, 34.7969, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1879.5078, -1741.4844, 10.8047, 0.25);
	RemoveBuildingForPlayer(playerid, 1537, 1837.4375, -1683.9688, 12.3047, 0.25);
	RemoveBuildingForPlayer(playerid, 1533, 1837.4375, -1683.9531, 12.3047, 0.25);
	RemoveBuildingForPlayer(playerid, 1537, 1837.4375, -1686.9844, 12.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1832.8984, -1670.7656, 9.7188, 0.25);
	RemoveBuildingForPlayer(playerid, 1533, 1837.4375, -1677.9219, 12.2969, 0.25);
	RemoveBuildingForPlayer(playerid, 1537, 1837.4375, -1680.9531, 12.2969, 0.25);
	RemoveBuildingForPlayer(playerid, 1533, 1837.4375, -1680.9375, 12.2969, 0.25);
	RemoveBuildingForPlayer(playerid, 5408, 1873.7422, -1682.4766, 34.7969, 0.25);
	RemoveBuildingForPlayer(playerid, 712, 1929.5781, -1694.4609, 21.3906, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1931.0391, -1667.0313, 10.8047, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1879.5078, -1623.1016, 10.8047, 0.25);
But it didn't remove the streets, so i had to use the function like this:

Code:
	RemoveBuildingForPlayer(playerid, -1, 1929.5781, -1736.9063, 21.3906, 28.0);
	RemoveBuildingForPlayer(playerid, -1, 1931.0391, -1726.3281, 10.8047, 28.0);
	RemoveBuildingForPlayer(playerid, -1, 1832.3828, -1694.3125, 9.7188, 28.0);
	RemoveBuildingForPlayer(playerid, -1, 1832.8984, -1670.7656, 9.7188, 28.0);
	RemoveBuildingForPlayer(playerid, -1, 1931.0391, -1702.2891, 10.8047, 28.0);
	RemoveBuildingForPlayer(playerid, -1, 1929.5781, -1694.4609, 21.3906, 28.0);
	RemoveBuildingForPlayer(playerid, -1, 1931.0391, -1667.0313, 10.8047, 28.0);
 	RemoveBuildingForPlayer(playerid, -1, 1931.0391, -1637.8984, 10.8047, 28.0);

	RemoveBuildingForPlayer(playerid, -1, 1832.8359, -1751.5078, 15.5859, 34.0);
	RemoveBuildingForPlayer(playerid, -1, 1952.5156, -1751.3750, 15.5547, 34.0);
Example:


When i change the variable that increases the radius of distance to erase what is within that radius, 2 of the streets were deleted, but I did not succeed with the street above and below, use a radius of 500.0 and one of 1000.0 but even so they were not erased.

Does anyone know why this happens, or has something similar happened to him?
Reply
#2

There's a limit to RemoveBuildingForPlayer, are you sure you didn't exceed that limit?
Reply
#3

Quote:
Originally Posted by Beckett
View Post
There's a limit to RemoveBuildingForPlayer, are you sure you didn't exceed that limit?
Yes, i'm sure.
They are also the only objects that i have eliminated in the whole map, therefore i havent exceeded that limit, try yourself to check it and you will realize that the streets are not erased.
Reply
#4

Anyone?
Reply
#5

I dont know, where this should be?!

Can you send us the coordinates?

//Edit: The coords you have in the removebuilding are from the alhambra, i dont know, where there should be this place?!
Reply
#6

Quote:
Originally Posted by Kaliber
View Post
I dont know, where this should be?!

Can you send us the coordinates?

//Edit: The coords you have in the removebuilding are from the alhambra, i dont know, where there should be this place?!
Hello, the floor is a custom model.
in any case, the problem arises when you try to delete the 4 streets surrounding the alhambra, that is my problem, the streets are not deleted with the normal parameters of RemoveBuilding, the only way i found to delete was the ones i showed above.

These are the 4 streets that i try to eliminate, but as i said before, using the normal parameters does not work, at least not for me.
Reply
#7

I can remove these 4 streets perfectly with:

PHP Code:
RemoveBuildingForPlayer(playerid55341927.7031, -1754.312512.46090.25);
RemoveBuildingForPlayer(playerid55411822.8906, -1725.257812.46880.25);
RemoveBuildingForPlayer(playerid55421884.6641, -1613.421912.46090.25);
RemoveBuildingForPlayer(playerid55431941.6563, -1682.570312.47660.25);
RemoveBuildingForPlayer(playerid55031927.7031, -1754.312512.46090.25);
RemoveBuildingForPlayer(playerid55021822.8906, -1725.257812.46880.25);
RemoveBuildingForPlayer(playerid54411941.6563, -1682.570312.47660.25);
RemoveBuildingForPlayer(playerid55011884.6641, -1613.421912.46090.25); 
Reply
#8

Quote:
Originally Posted by Kaliber
View Post
I can remove these 4 streets perfectly with:

PHP Code:
RemoveBuildingForPlayer(playerid55341927.7031, -1754.312512.46090.25);
RemoveBuildingForPlayer(playerid55411822.8906, -1725.257812.46880.25);
RemoveBuildingForPlayer(playerid55421884.6641, -1613.421912.46090.25);
RemoveBuildingForPlayer(playerid55431941.6563, -1682.570312.47660.25);
RemoveBuildingForPlayer(playerid55031927.7031, -1754.312512.46090.25);
RemoveBuildingForPlayer(playerid55021822.8906, -1725.257812.46880.25);
RemoveBuildingForPlayer(playerid54411941.6563, -1682.570312.47660.25);
RemoveBuildingForPlayer(playerid55011884.6641, -1613.421912.46090.25); 
Streets can be removed within MapConstruction, but within the game they are still there, did u verify that the streets were actually deleted in your server?
Reply
#9

Yes, i veryfied it in the game, they were removed.

Maybe you dont call it right for the player?

or you have somewhere createobejcts, that replace it...
Reply
#10

Quote:
Originally Posted by Kaliber
View Post
Yes, i veryfied it in the game, they were removed.

Maybe you dont call it right for the player?

or you have somewhere createobejcts, that replace it...
Apparently it worked.
I dont understand why they were not erased before, but hey, thanks anyway.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)