PDA

View Full Version : Removing the entire map


Garr
14/07/2019, 06:22 AM
What are the adverse effects of using a command like this to remove the entire map? If used on a server with many players, what would the performance hit be? Is it viable?

RemoveBuildingForPlayer(playerid, -1, 0.0, 0.0, 0.0, 6000.0);

Bolex_
14/07/2019, 12:02 PM
Wiki says:

In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius

public OnPlayerConnect(playerid)
{
// When the player connects, all map objects will be removed in radius of 6000 meters.
RemoveBuildingForPlayer(playerid, -1, 0.0, 0.0, 0.0, 6000.0);
return 1;
}

Garr
14/07/2019, 12:27 PM
Wiki says:



public OnPlayerConnect(playerid)
{
// When the player connects, all map objects will be removed in radius of 6000 meters.
RemoveBuildingForPlayer(playerid, -1, 0.0, 0.0, 0.0, 6000.0);
return 1;
}

Reckon it's a good idea to read the post before you reply. But hey, thank for trying to help. I know how to remove the map, but I'm asking if there will be any consequences or server issues stemming from doing this on a server with 100+ people on.

Bolex_
14/07/2019, 12:43 PM
Of course there will be the consequences if you remove the same objects twice and player/s client might crash. Of course, if you remove the roads/hill and player go there he might fall down.

Dignity
14/07/2019, 12:47 PM
There's no consequences.

I've done it on my Wild West and Medieval server. Each tested with over 80+ players and about 50,000+ objects.

There were crash issues but that's widely due to HQ custom models and layered 3d text labels.

Garr
14/07/2019, 12:49 PM
There's no consequences.

I've done it on my Wild West and Medieval server. Each tested with over 80+ players and about 50,000+ objects.

There were crash issues but that's widely due to HQ custom models and layered 3d text labels.

Thank you.

Dignity
14/07/2019, 02:21 PM
No problem.

To add on to what I said: crash issues significantly decreased once we removed some of the systems that generated dynamic labels.

Opcodes remained but I'm still very confident that it's because of custom models.

Opcode 0xC000005 for whoever is wondering.