Problem with RemoveBuildingForPlayer
#3

Quote:
Originally Posted by Amunra
Посмотреть сообщение
Where you add this Code ?
You must at this code At OnFilterScriptInit() or OnGamemodeInit()
OnPlayerConnect() you meant


Also please note that RemoveBuldingForPlayer() has limit of 1000 lines objects use (use -1 to remove all in radius, this will count 1). It can be also caused by other part of script, not just the codes you pasted here.

It looks like you are removing them by using Map Editor, you should've make it less when you are using to remove same model in close position, instead of 0.25 value, i.e. these lines:
Код:
RemoveBuildingForPlayer(playerid, 1408, 1093.1479, -298.21677, 73.26028, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1097.8545, -291.36279, 73.65871, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1106.7778, -291.51889, 73.3994, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1120.9656, -292.55768, 73.5381, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1110.562, -291.54581, 74.18594, 0.25);

RemoveBuildingForPlayer(playerid, 1408, 1100.7449, -329.85995, 73.60794, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1111.4664, -330.04874, 73.75398, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1120.8241, -300.81204, 73.2121, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1120.681, -308.20941, 73.51045, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1120.5083, -318.04892, 73.52, 0.25);
As you can see the positions of the objects are close, you could do this with one line code instead:
Код:
RemoveBuildingForPlayer(playerid, 1408, 1108.1138, -306.5763, 73.6408, 30.0);
By positioning the coords at the center/between objects above and increasing radius to 30 SA Unit.
And then you can do the same for other same model which are placed in same radius (e.g. lines with model 3276).

Not yet tested, hope that helps.
Reply


Messages In This Thread
Problem with RemoveBuildingForPlayer - by Blamfast - 15.01.2016, 22:45
Re: Problem with RemoveBuildingForPlayer - by Amunra - 15.01.2016, 23:40
Re: Problem with RemoveBuildingForPlayer - by RoboN1X - 16.01.2016, 00:28
Re: Problem with RemoveBuildingForPlayer - by Blamfast - 16.01.2016, 08:54

Forum Jump:


Users browsing this thread: 2 Guest(s)