RemoveBuildingForPlayer - freeze.
#1

Hey, I've a problem with too many RemoveBuildingForPlayer.

I've something like 1,050 objects that removed, and i need everything, i cannot to disable some.
Last night i added more 100 objects and it's start to freeze (i removed other objects to see if this problem with those object and no, it's work, it just too many removebulidng).

There's something i can do?
Thanks.
Reply
#2

Make sure everything can stream in properly for players (by either using timers for partial loading or behind the scene teleports). You should use a streamer for your regular objects, and make sure your players don't spawn between the removed objects, because that is probably the cause of your client crashing.
Reply
#3

Quote:
Originally Posted by Mionee
View Post
Make sure everything can stream in properly for players (by either using timers for partial loading or behind the scene teleports). You should use a streamer for your regular objects, and make sure your players don't spawn between the removed objects, because that is probably the cause of your client crashing.
I dont remove streamer objects, only map objects.
No, I did it OnPlayerConnect with a stock.
Reply
#4

Quote:
Originally Posted by AfikAtashga
View Post
I dont remove streamer objects, only map objects.
No, I did it OnPlayerConnect with a stock.
Probably the problem is the stock.
Reply
#5

Quote:
Originally Posted by Maro06
View Post
Probably the problem is the stock.
What problem can be in the stock? It's just like:

Code:
public OnPlayerConnect(playerid)
{
RemoveBuildings();
return true;
}

stock RemoveBulidngs()
{
RemoveBuilidngForPlayer(...);
RemoveBuilidngForPlayer(...);
RemoveBuilidngForPlayer(...);
RemoveBuilidngForPlayer(...);
}
Reply
#6

If that is your real stock, it's quite obvious it's not working since it's missing the "playerid" param.
Reply
#7

Quote:
Originally Posted by Mionee
View Post
If that is your real stock, it's quite obvious it's not working since it's missing the "playerid" param.
It just a demo. It's not my stock. You want my?:

Code:
public OnPlayerConnect(playerid)
{
	RemovePlayerObjects(playerid);
	return true;
}

stock RemovePlayerObjects(playerid)
{
	// FightSystem SHIP
	RemoveBuildingForPlayer(playerid, 9584, -2485.0781, 1544.9453, 26.1953, 0.25);
	RemoveBuildingForPlayer(playerid, 9585, -2409.8438, 1544.9453, 7.0000, 0.25);
	RemoveBuildingForPlayer(playerid, 9586, -2412.1250, 1544.9453, 17.0469, 0.25);
	RemoveBuildingForPlayer(playerid, 9587, -2401.1406, 1544.9375, 23.5938, 0.25);
	RemoveBuildingForPlayer(playerid, 9590, -2403.5078, 1544.9453, 8.7188, 0.25);
	RemoveBuildingForPlayer(playerid, 9604, -2392.5938, 1545.9063, 24.8594, 0.25);
	RemoveBuildingForPlayer(playerid, 9619, -2409.8438, 1544.9453, 7.0000, 0.25);
	RemoveBuildingForPlayer(playerid, 9620, -2485.0781, 1544.9453, 26.1953, 0.25);
	RemoveBuildingForPlayer(playerid, 9621, -2401.1406, 1544.9375, 23.5938, 0.25);
	RemoveBuildingForPlayer(playerid, 9761, -2411.3906, 1544.9453, 27.0781, 0.25);
	RemoveBuildingForPlayer(playerid, 9820, -2474.6250, 1545.0859, 33.0625, 0.25);
	RemoveBuildingForPlayer(playerid, 9698, -2473.5859, 1543.7734, 29.0781, 0.25);
	RemoveBuildingForPlayer(playerid, 9821, -2474.3594, 1547.2422, 24.7500, 0.25);
	RemoveBuildingForPlayer(playerid, 9822, -2470.9375, 1550.7500, 32.9063, 0.25);
	RemoveBuildingForPlayer(playerid, 9818, -2470.2656, 1544.9609, 33.8672, 0.25);
	RemoveBuildingForPlayer(playerid, 9819, -2470.4531, 1551.1172, 33.1406, 0.25);
	RemoveBuildingForPlayer(playerid, 1558, -2427.6953, 1550.9219, 25.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 1558, -2425.0078, 1549.1250, 22.6953, 0.25);
	RemoveBuildingForPlayer(playerid, 1558, -2421.7344, 1550.7656, 25.6250, 0.25);
	RemoveBuildingForPlayer(playerid, 1558, -2406.2109, 1545.5703, 25.6250, 0.25);
	return true;
}
Just add more 1,000 removebuildings.
Reply
#8

You can't use RemoveBuildingForPlayer for many objects or else your game will crash FYI.
Reply
#9

Quote:
Originally Posted by iZN
View Post
You can't use RemoveBuildingForPlayer for many objects or else your game will crash FYI.
Look up comment.
Reply
#10

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)