Remove all SA objects -
Jstylezzz - 12.04.2013
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.
Re: Remove all SA objects -
Pottus - 12.04.2013
Doesn't work stop trying.
Re: Remove all SA objects -
iJumbo - 12.04.2013
Only act to client but not from server
Re: Remove all SA objects -
Scenario - 12.04.2013
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);
Re: Remove all SA objects -
Jstylezzz - 12.04.2013
Very good point, I'll play around with that. Thanks : )
Re: Remove all SA objects -
Sithis - 12.04.2013
Quote:
Originally Posted by RealCop228
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.
Re: Remove all SA objects -
Jstylezzz - 12.04.2013
Quote:
Originally Posted by RealCop228
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
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
Re: Remove all SA objects -
Vince - 12.04.2013
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.
Re: Remove all SA objects -
Jstylezzz - 12.04.2013
Quote:
Originally Posted by Vince
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
Re: Remove all SA objects -
Scenario - 12.04.2013
@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>
Re: Remove all SA objects -
Jstylezzz - 12.04.2013
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)
Re: Remove all SA objects -
Basssiiie - 12.04.2013
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.
Re: Remove all SA objects -
MP2 - 12.04.2013
AFAIK RemoveBuildingForPlayer is limited to 1000 objects, I've never personally tested this however.
Re: Remove all SA objects -
Jstylezzz - 13.04.2013
Quote:
Originally Posted by Y_Less
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
Re: Remove all SA objects -
LevPopov - 03.12.2013