RemoveObjectForPlayer limit?
#1

Hello there. There is problem with RemoveObjectForPlayer function. After removing ~1100 objects samp client freezes. Is there any limit for objects removing, or something else?
Reply
#2

I had same problem, just remove only most needed objects and dont use that function under OnPlayerSpawn, each time player dies orso and spawns game will remove objs again and after 2~3 times your game will just freeze aswell
Reply
#3

Quote:
Originally Posted by ikey07
View Post
I had same problem, just remove only most needed objects and dont use that function under OnPlayerSpawn, each time player dies orso and spawns game will remove objs again and after 2~3 times your game will just freeze aswell
yea, i know, so i use it only on player login. And wiki doesnt say anything about that limit..
Reply
#4

Same. I got same problem also...
Reply
#5

As said before don't remove unnecessary buildings/objects. I don't think there is a limit but precautions should be taken
Reply
#6

No You Can RemoveBuliding . u need include removebuildingforplayer.inc to can compile without problem Download it from here http://forum.sa-mp.com/showthread.ph...Removebuilding
Reply
#7

Quote:
Originally Posted by Vin Diesel
View Post
No You Can RemoveBuliding . u need include removebuildingforplayer.inc to can compile without problem Download it from here http://forum.sa-mp.com/showthread.ph...Removebuilding
RemoveBuildingForPlayer / RemoveObjectForPlayer it makes no sense, just a typo ..
Reply
#8

Remove objects under OnPlayerConnect. Difference with RemoveBuildingForPlayer and RemoveObjectForPlayer ? Well Removing buildings using the function RemoveBuildingForPlayer helps reduce RemoveObjectForPlayer which I believe you use buildings? or maybe not. Limit? I think there is no limit but as what as Djean said be careful and precaution .
Reply
#9

Quote:
Originally Posted by Yiin
View Post
Hello there. There is problem with RemoveObjectForPlayer function. After removing ~1100 objects samp client freezes. Is there any limit for objects removing, or something else?
Client.

Might it be CPU overload client-side? Try setting a timer on removing buildings, see if that works. Remove 1 building each 10ms or something like that.
Reply
#10

It has some limit, as
pawn Code:
for(new i; i < 17000; i++)
{
    RemoveBuildingForPlayer(playerid, i, 0.0, 0.0, 0.0, 2000.0);
}
will crash your game


My tip is try to increase range if you remove same object near each other, like some light poles etc and dont remove lod objects if it doesnt conflicts with new mapping
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)