Help with RemoveBuildingForPlayer
#1

Hello everybody I have a problem with my server with this stock sometimes my game crashes first at all my character
get freezed later if I press the windows key the GTA is not responding (server doesn't crash) just the game I don't know the reason of this I have removed a lot of Builings(200 objects) I don't know if exists a limit...

if I add this stock to AfterPlayerConnect the GTA crashes (not immediately) later of time
if I remove it doesn't crash anymore

Код:
stock RemoveObjexcts()
{
	for (new playerid=0; playerid<MAX_PLAYERS; playerid++)
	{
	RemoveBuildingForPlayer(playerid, 1220, 1338.9375, -1795.4609, 12.9297, 0.25);
	RemoveBuildingForPlayer(playerid, 1221, 1338.9688, -1793.7266, 12.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 4021, 1371.8203, -1754.8203, 19.0469, 0.25);
	}
       return 1;
}
The crashes are later of sometime connected about 10 minutes
I have an idea if is because when a player connects the stock is launched again.

Regards.
Reply
#2

you have idea? Then why you're tellin' us??


NOooOB
Reply
#3

pawn Код:
RemoveBuildingForPlayer(playerid, 1220, 1338.9375, -1795.4609, 12.9297, 0.25);
    RemoveBuildingForPlayer(playerid, 1221, 1338.9688, -1793.7266, 12.9844, 0.25);
    RemoveBuildingForPlayer(playerid, 4021, 1371.8203, -1754.8203, 19.0469, 0.25);
Put this OnPlayerConnect.
Reply
#4

Quote:
Originally Posted by Jankingston
Посмотреть сообщение
you have idea? Then why you're tellin' us??


NOooOB
Uncalled for and rude. If you don't have anything of value to help others, then don't even bother replying.


OT:

remove the stock part and just use the RemoveBuildingForPlayer like Alex was kind enough to say.
Reply
#5

Quote:
Originally Posted by Alex Magaсa
Посмотреть сообщение
pawn Код:
RemoveBuildingForPlayer(playerid, 1220, 1338.9375, -1795.4609, 12.9297, 0.25);
    RemoveBuildingForPlayer(playerid, 1221, 1338.9688, -1793.7266, 12.9844, 0.25);
    RemoveBuildingForPlayer(playerid, 4021, 1371.8203, -1754.8203, 19.0469, 0.25);
Put this OnPlayerConnect.
Works for me aswell, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)