Problem with RemoveBuilding? -
Mrhind - 12.03.2020
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?
Re: Problem with RemoveBuilding? -
Beckett - 12.03.2020
There's a limit to
RemoveBuildingForPlayer, are you sure you didn't exceed that limit?
Re: Problem with RemoveBuilding? -
Mrhind - 12.03.2020
Quote:
Originally Posted by Beckett
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.
Re: Problem with RemoveBuilding? -
Mrhind - 12.03.2020
Anyone?
Re: Problem with RemoveBuilding? -
Kaliber - 13.03.2020
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?!
Re: Problem with RemoveBuilding? -
Mrhind - 13.03.2020
Quote:
Originally Posted by Kaliber
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.
Re: Problem with RemoveBuilding? -
Kaliber - 13.03.2020
I can remove these 4 streets perfectly with:
PHP Code:
RemoveBuildingForPlayer(playerid, 5534, 1927.7031, -1754.3125, 12.4609, 0.25);
RemoveBuildingForPlayer(playerid, 5541, 1822.8906, -1725.2578, 12.4688, 0.25);
RemoveBuildingForPlayer(playerid, 5542, 1884.6641, -1613.4219, 12.4609, 0.25);
RemoveBuildingForPlayer(playerid, 5543, 1941.6563, -1682.5703, 12.4766, 0.25);
RemoveBuildingForPlayer(playerid, 5503, 1927.7031, -1754.3125, 12.4609, 0.25);
RemoveBuildingForPlayer(playerid, 5502, 1822.8906, -1725.2578, 12.4688, 0.25);
RemoveBuildingForPlayer(playerid, 5441, 1941.6563, -1682.5703, 12.4766, 0.25);
RemoveBuildingForPlayer(playerid, 5501, 1884.6641, -1613.4219, 12.4609, 0.25);
Re: Problem with RemoveBuilding? -
Mrhind - 13.03.2020
Quote:
Originally Posted by Kaliber
I can remove these 4 streets perfectly with:
PHP Code:
RemoveBuildingForPlayer(playerid, 5534, 1927.7031, -1754.3125, 12.4609, 0.25);
RemoveBuildingForPlayer(playerid, 5541, 1822.8906, -1725.2578, 12.4688, 0.25);
RemoveBuildingForPlayer(playerid, 5542, 1884.6641, -1613.4219, 12.4609, 0.25);
RemoveBuildingForPlayer(playerid, 5543, 1941.6563, -1682.5703, 12.4766, 0.25);
RemoveBuildingForPlayer(playerid, 5503, 1927.7031, -1754.3125, 12.4609, 0.25);
RemoveBuildingForPlayer(playerid, 5502, 1822.8906, -1725.2578, 12.4688, 0.25);
RemoveBuildingForPlayer(playerid, 5441, 1941.6563, -1682.5703, 12.4766, 0.25);
RemoveBuildingForPlayer(playerid, 5501, 1884.6641, -1613.4219, 12.4609, 0.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?
Re: Problem with RemoveBuilding? -
Kaliber - 13.03.2020
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...
Re: Problem with RemoveBuilding? -
Mrhind - 14.03.2020
Quote:
Originally Posted by Kaliber
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.