SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/03/2020, 05:06 AM   #1
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 79
Reputation: 61
Default Problem with RemoveBuilding?

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?
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

Mrhind is offline   Reply With Quote
Old 12/03/2020, 10:44 AM   #2
Beckett
High-roller
 
Beckett's Avatar
 
Join Date: Feb 2012
Location: www.finalnights-rp.com
Posts: 1,794
Reputation: 104
Default Re: Problem with RemoveBuilding?

There's a limit to RemoveBuildingForPlayer, are you sure you didn't exceed that limit?
__________________
Final Nights Roleplay
The first SA-MP server that is not regulated by administrators.
No OOC hierarchy. Strictly directed by players. Utopian vision.

El primer servidor SA-MP que no está regulado por los administradores.
Sin jerarquías OOC. Estrictamente dirigido por jugadores. Visión utópica.

Primul server de SA-MP care nu este regulat de administratori.
Fără ierarhie OOC. Strict dictat de jucători. Visiune utopică.

Yöneticiler tarafından düzenlenmeyen ilk SA-MP sunucusu.
OOC hiyerarşisi yok. Kesinlikle oyuncular tarafından yönetiliyor. Ütopik görme.


Become a Member of our Discord Channel
Beckett is offline   Reply With Quote
Old 12/03/2020, 03:36 PM   #3
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 79
Reputation: 61
Default Re: Problem with RemoveBuilding?

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.
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

Mrhind is offline   Reply With Quote
Old 12/03/2020, 11:39 PM   #4
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 79
Reputation: 61
Default Re: Problem with RemoveBuilding?

Anyone?
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

Mrhind is offline   Reply With Quote
Old 13/03/2020, 02:16 AM   #5
Kaliber
High-roller
 
Kaliber's Avatar
 
Join Date: Jun 2012
Location: Localhost
Posts: 1,092
Reputation: 156
Default Re: Problem with RemoveBuilding?

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?!
__________________
Kaliber is offline   Reply With Quote
Old 13/03/2020, 07:37 AM   #6
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 79
Reputation: 61
Default Re: Problem with RemoveBuilding?

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.
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

Mrhind is offline   Reply With Quote
Old 13/03/2020, 03:14 PM   #7
Kaliber
High-roller
 
Kaliber's Avatar
 
Join Date: Jun 2012
Location: Localhost
Posts: 1,092
Reputation: 156
Default Re: Problem with RemoveBuilding?

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); 
__________________
Kaliber is offline   Reply With Quote
Old 13/03/2020, 06:46 PM   #8
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 79
Reputation: 61
Default Re: Problem with RemoveBuilding?

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?
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

Mrhind is offline   Reply With Quote
Old 13/03/2020, 08:42 PM   #9
Kaliber
High-roller
 
Kaliber's Avatar
 
Join Date: Jun 2012
Location: Localhost
Posts: 1,092
Reputation: 156
Default Re: Problem with RemoveBuilding?

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...
__________________
Kaliber is offline   Reply With Quote
Old 14/03/2020, 04:04 AM   #10
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 79
Reputation: 61
Default Re: Problem with RemoveBuilding?

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.
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

Mrhind is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help RemoveBuilding Map TVDYNAMO Scripting Help 3 19/11/2014 07:42 AM
I need help to add removebuilding?. JackieJ Scripting Help 4 05/03/2014 07:34 PM
Removebuilding problem benjaminjones Scripting Help 6 23/02/2014 01:54 PM
haveing a problem with the removebuilding function Angel- Scripting Help 3 17/06/2012 09:23 PM
Can Some One help me with Removebuilding? GAMER_PS2 Scripting Help 3 30/03/2012 02:33 PM


All times are GMT. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.