RemoveBuildingForPlayer Limits
#1

Hello

Quick question. I've talked to numerous people about this, but it seems people aren't quite sure. So hopefully someone high up or with actual knowledge of SA:MPs internals can answer. Is there any limit placed upon RemoveBuildingForPlayer?

I ask because I have noticed the following;

A) Removing more than 1000 rapidly results in a crash of the client, usually.
B) Lets say script #1 deletes 300 objects, the next deletes 500 and the next another 300. Eventually RemoveBuildingForPlayer stops working, and the buildings remain. This is loading maps on-the-fly loading and unloading, not using GMX. (I am trying to avoid GMX)

Can anyone tell me for sure if these are script errors, or limitations placed upon the function by SA:MP?

Thanks for your time!
Reply
#2

I have no actual knowledge of SA-MP internals, so I can't tell you anything "for sure", this is just based on knowledge of SA and logic.

The client has to store the list of "removed buildings" for when the world streams in and out, so I imagine that there is indeed a limit to the size of this list, and therefore the number of RemoveBuildingForPlayer calls that can be made before it simply doesn't work anymore. (B)

In regard to A, this is probably just because you're making the engine do far too much at once. It's likely similar to the limits (especially in past versions) on CreateObject, and too many objects in the same area, etc. - SA doesn't exactly have the best game engine in the world.

It would be useful to know what the limit for RemoveBuildingForPlayer is, and in your case, it would be useful to have something like a RestoreBuildingForPlayer function.
Reply
#3

The limit is 1000. I have seen it somewhere, although i am not sure where to be honest. But i think i have seen it and that it is 1000
Reply
#4

There is no official limit documented how-ever it is seen through-out some threads that the limit is in-fact 1000.
Examples,
https://sampforum.blast.hk/showthread.php?tid=330868

Is there anything strange shown in the server_log file before the client crashes?
Reply
#5

Nothing strange.

Someone once said on IRC there used to be a limit, but it was later removed. Anyone can confirm or deny this? I think it was said by someone quite high up on IRC (op or higher)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)