Is there a way to remove the COMPLETE map?
#1

Hello, as the title says I am wondering if it is possible to remove the whole map in one code? Because I need this for a project.
I once tried a small piece of code that should've removed it all but it made SA-MP crash.
Does anyone know a way wich doesn't invlolve me sitting infront of my pc carefully selecting every object and deleting them?
Reply
#2

O.O you want to delete whole san andreas? if i undestood well? :P
Reply
#3

In "one code?" Probably not. I think your best bet is trying to individually remove buildings in your area with the RemovePlayerBuilding function, but you're going to have hundreds of lines of code.
Reply
#4

Quote:
Originally Posted by Calgon
Посмотреть сообщение
In "one code?" Probably not. I think your best bet is trying to individually remove buildings in your area with the RemovePlayerBuilding function, but you're going to have hundreds of lines of code.
Thousands of line of codes.
Reply
#5

Ah poop, and there is no such code with all the removebuidlings yet?
Reply
#6

JernejL's map editor is pretty advanced, if you can select masses of objects to delete, I'm sure it'll be a lot easier.

If you're looking in to remapping an area, why don't you consider taking some woodland and trying to remove the objects from the area? If you can.

Quote:
Originally Posted by rinori
Посмотреть сообщение
Thousands of line of codes.
True.
Reply
#7

I don't think this is possible with a 'few lines' of code, though is definitely possible.

A way to check if a 'static' object (San Andreas object) is valid would go down a treat in this case.

pawn Код:
#define SA_OBJECTS 18630 //I'm basing this number on the fact that SA-MP objects start at 16831

for(new i; i < SA_OBJECTS; i++)
{
     if(!IsValidStaticObject(i)) continue;
     RemoveSpecificBuilding(i); //A function from my include. Though it is basically: RemoveBuildingForPlayer([everyone], i, 0.0, 0.0, 0.0, A_HIGH_NUMBER.0);
}
Reply
#8

Quote:
Originally Posted by funky1234
Посмотреть сообщение
I don't think this is possible with a 'few lines' of code, though is definitely possible.

A way to check if a 'static' object (San Andreas object) is valid would go down a treat in this case.

pawn Код:
#define SA_OBJECTS 18630 //I'm basing this number on the fact that SA-MP objects start at 16831

for(new i; i < SA_OBJECTS; i++)
{
     if(!IsValidStaticObject(i)) continue;
     RemoveSpecificBuilding(i); //A function from my include. Though it is basically: RemoveBuildingForPlayer([everyone], i, 0.0, 0.0, 0.0, A_HIGH_NUMBER.0);
}
Are yuo sure that will work?
Reply
#9

Quote:
Originally Posted by justsomeguy
Посмотреть сообщение
Are yuo sure that will work?
Are you sure you're smart?TEST IT.
Reply
#10

Quote:
Originally Posted by justsomeguy
Посмотреть сообщение
Are yuo sure that will work?
It won't work, as there is no "IsValidStaticObject()" function. I was just giving an example as to how it could work. You could create an IsValidStaticObject function, then my code would work!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)