Remove all SA objects
#1

Hi all,

This might seem a strange question, and don't ask me why I try to do this, because it's pointless for you guys anyway.
So, what I try to do, is remove all objects, with all, I mean, everything. I don't know for how far this is possible. I've already tried a few things, but none of them worked. Is there anyone who knows how I can achieve this?

Thanks in advance.

Ps. Making a loop and delete all objects won't work. It works for 3 seconds, and crashes your client.
Reply
#2

Doesn't work stop trying.
Reply
#3

Only act to client but not from server
Reply
#4

Could you make a loop through all object models and then run this on a 50-100ms interval? Something like this, maybe?

pawn Code:
for(new model = 0; model < sizeof(objectModelArray); model++)
{
    defer removeBuildingsOnInterval(playerid, model);
}
   
timer removeBuildingsOnInterval[100](playerid, model) return RemoveBuildingForPlayer(playerid, model, 0.0, 0.0, 0.0, 9999.9999);
Reply
#5

Very good point, I'll play around with that. Thanks : )
Reply
#6

Quote:
Originally Posted by RealCop228
View Post
Could you make a loop through all object models and then run this on a 50-100ms interval? Something like this, maybe?

pawn Code:
for(new model = 0; model < sizeof(objectModelArray); model++)
{
    defer removeBuildingsOnInterval(playerid, model);
}
   
timer removeBuildingsOnInterval[100](playerid, model) return RemoveBuildingForPlayer(playerid, model, 0.0, 0.0, 0.0, 9999.9999);
Won't work i believe, there's a limit on how many RemoveBuildingForPlayer you can do, a 1000 i believe.
Reply
#7

Quote:
Originally Posted by RealCop228
View Post
Could you make a loop through all object models and then run this on a 50-100ms interval? Something like this, maybe?

pawn Code:
for(new model = 0; model < sizeof(objectModelArray); model++)
{
    defer removeBuildingsOnInterval(playerid, model);
}
   
timer removeBuildingsOnInterval[100](playerid, model) return RemoveBuildingForPlayer(playerid, model, 0.0, 0.0, 0.0, 9999.9999);
I tried to use your code, but when I added my object array it gives some errors (I never used y_timers before :$)
Code:
error 017: undefined symbol "removeBuildingsOnInterval_yT@"
error 029: invalid expression, assumed zero
error 017: undefined symbol "removeBuildingsOnInterval_yT@"
error 001: expected token: ";", but found "return"
fatal error 107: too many error messages on one line
The error lines is the code you posted (with my sizeof(allObjects) thingie)


Quote:
Originally Posted by Sithis
View Post
Won't work i believe, there's a limit on how many RemoveBuildingForPlayer you can do, a 1000 i believe.
Hmm, you could be right, but I haven't found any page describing a limit for it yet
Reply
#8

Even IF you succeeded in removing all objects you would end up with a void with a pool of water here and there. Believe it or not, but the emptiness won't become a flat water surface.
Reply
#9

Quote:
Originally Posted by Vince
View Post
Even IF you succeeded in removing all objects you would end up with a void with a pool of water here and there. Believe it or not, but the emptiness won't become a flat water surface.
I already figured that out :P Like those times you forget to properly close off a place you just deleted the ground from, quite irritating :3
Reply
#10

@Jstylezzz: How are you including y_timers? The code seems like it would be fine.

If you're doing this:

#include <YSI/y_timers>

change it to:

#include <YSI\y_timers>
Reply
#11

I include them like the 2nd one, YSI\y_timers, but if the code is right, then probably I installed YSI the wrong way. I'll play around with that, later. (I'm going to get some well deserved sleep first :3)
Reply
#12

Along with the RemoveBuildingForPlayer limit and the void holes in the water, this might also be a problem. Not all objects can be accessed or removed.
Reply
#13

AFAIK RemoveBuildingForPlayer is limited to 1000 objects, I've never personally tested this however.
Reply
#14

Quote:
Originally Posted by Y_Less
View Post
I have tested it and can say for certain that there is currently no way to remove all the objects from the world. Of course, if you do, in what sense are you playing "San Andreas" multiplayer? This mod has always had a strong focus on maintaining some semblance of the original game (unlike other mods), so while this restriction is not intended I doubt it's considered a problem.
You have a point there. I don't think removing all objects would bring me anywhere anyway :P
Reply
#15

Here's the solution - http://forum.sa-mp.com/showthread.ph...68#post2805468
Works but client is crash.

P.S. Sorry for my bad english. I'am Russian.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)