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. |
public OnPlayerConnect(playerid) { RemoveBuildings(); return true; } stock RemoveBulidngs() { RemoveBuilidngForPlayer(...); RemoveBuilidngForPlayer(...); RemoveBuilidngForPlayer(...); RemoveBuilidngForPlayer(...); }
If that is your real stock, it's quite obvious it's not working since it's missing the "playerid" param.
|
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; }
You can't use RemoveBuildingForPlayer for many objects or else your game will crash FYI.
|