Problem with RemoveBuildingForPlayer
#1

Good morning community !

I have decided to make a bit of mapping this time and I've met a problem. I've used RemoveBuildingForPlayer but when i'm in game, i can still see the mapping but this bug, he disappears and he reappears when I move my mouse.
Can you help please it's very important...
I give you the code
Код:
	RemoveBuildingForPlayer(playerid, 3375, 1070.4766, -355.16406, 77.33594, 0.25);
RemoveBuildingForPlayer(playerid, 3402, 1019.3828, -300.24219, 72.98438, 0.25);
RemoveBuildingForPlayer(playerid, 3402, 1045.5625, -300.60156, 72.98438, 0.25);
RemoveBuildingForPlayer(playerid, 13206, 1072.9531, -289.17969, 72.73438, 0.25);
RemoveBuildingForPlayer(playerid, 672, 1097.4688, -314.21094, 73.66406, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1092.7737, -319.06232, 73.06147, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1092.6467, -326.92606, 73.81704, 0.25);
RemoveBuildingForPlayer(playerid, 3250, 1110.2422, -298.94531, 73.03906, 0.25);
RemoveBuildingForPlayer(playerid, 656, 1096.625, -294.41406, 72.9375, 0.25);
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, 3253, 1106.6406, -319.875, 73.74219, 0.25);
RemoveBuildingForPlayer(playerid, 700, 1106.5469, -328.16406, 73.17969, 0.25);
RemoveBuildingForPlayer(playerid, 700, 1095.3828, -327.47656, 73.17969, 0.25);
RemoveBuildingForPlayer(playerid, 656, 1116.4453, -326.75781, 72.9375, 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);
RemoveBuildingForPlayer(playerid, 1408, 1120.3466, -327.20709, 73.7962, 0.25);
RemoveBuildingForPlayer(playerid, 1408, 1107.8926, -329.98187, 73.47643, 0.25);
RemoveBuildingForPlayer(playerid, 3175, 1114.2969, -353.82031, 72.79688, 0.25);
RemoveBuildingForPlayer(playerid, 3175, 1107.5938, -358.51562, 72.79688, 0.25);
RemoveBuildingForPlayer(playerid, 3286, 1099.1172, -358.47656, 77.61719, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1109.8541, -368.46524, 73.49958, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1085.5861, -368.42484, 73.54898, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1070.3676, -368.40338, 74.02808, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1059.9359, -368.38211, 73.71446, 0.25);
RemoveBuildingForPlayer(playerid, 3425, 1015.0938, -361.10156, 84.03906, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.7878, -363.14282, 73.57722, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.7365, -350.3443, 73.08564, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.6483, -330.0831, 73.47137, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.5851, -314.46698, 73.32922, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.5287, -300.44131, 73.55184, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.4886, -290.3566, 73.19763, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1011.7437, -282.9306, 73.12161, 0.25);
RemoveBuildingForPlayer(playerid, 1503, 1019.4789, -282.36438, 74.0565, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1021.2877, -280.01794, 73.58164, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1052.6217, -280.85822, 73.92881, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1079.9119, -283.22397, 74.17196, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1042.8674, -369.4982, 73.24522, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1042.813, -386.03287, 70.68417, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.9223, -388.78616, 71.14932, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1007.8063, -416.96573, 63.20601, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1008.6413, -429.51474, 57.9976, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1009.8961, -443.83804, 53.0249, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1040.6034, -435.33853, 52.78665, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1041.8276, -422.04416, 57.84222, 0.25);
RemoveBuildingForPlayer(playerid, 3276, 1042.7063, -413.04303, 61.83315, 0.25);
RemoveBuildingForPlayer(playerid, 4016, 1497.7969, -1543.7109, 17.55469, 0.25);
Thanks guys
Reply
#2

Where you add this Code ?
You must at this code At OnFilterScriptInit() or OnGamemodeInit()
Reply
#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
#4

Good morning guys thanks for your help.
I've just used a bad convertor on internet and i've changed MTA for MAP Editor, and it's run.
Thank you !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)