RemoveObjectForPlayer limit? -
Yiin - 30.11.2012
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?
Re: RemoveObjectForPlayer limit? -
ikey07 - 30.11.2012
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
Re: RemoveObjectForPlayer limit? -
Yiin - 30.11.2012
Quote:
Originally Posted by ikey07
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..
Re: RemoveObjectForPlayer limit? -
DowDaw - 30.11.2012
Same. I got same problem also...
Re: RemoveObjectForPlayer limit? -
Djean - 01.12.2012
As said before don't remove unnecessary buildings/objects. I don't think there is a limit but precautions should be taken
Re: RemoveObjectForPlayer limit? -
Vin Diesel - 01.12.2012
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
Re: RemoveObjectForPlayer limit? -
Yiin - 01.12.2012
Quote:
Originally Posted by Vin Diesel
|
RemoveBuildingForPlayer / RemoveObjectForPlayer it makes no sense, just a typo ..
Re: RemoveObjectForPlayer limit? -
Sting. - 01.12.2012
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 .
Re: RemoveObjectForPlayer limit? - [MM]IKKE - 01.12.2012
Quote:
Originally Posted by Yiin
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.
Re: RemoveObjectForPlayer limit? -
ikey07 - 01.12.2012
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