SA-MP Forums Archive
RemoveBuildingForPlayer bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: RemoveBuildingForPlayer bug (/showthread.php?tid=360856)



RemoveBuildingForPlayer bug - Amit_B - 19.07.2012

Hey,

I've lately used RemoveBuildingForPlayer to allow players sail in the LV pirate ship.
My code is removing the exist pirate ship objects, and creates new ones that i'll be able to control.

Anyway, i've noticed that when using RemoveBuildingForPlayer on a specific modelid, he will not see ANY object (game or script object) with the specific modelid. However, the player will see objects with the same modelid if i'll create them after using RemoveBuildingForPlayer on him.
I'm not sure if it's really a bug, but anyway, I guess that it will cause some players to see specific objects and some other players will not see it. Depends on if the CreateObject() used when they're in-game.


Re: RemoveBuildingForPlayer bug - MP2 - 19.07.2012

Wait, what? Use the map editor.


Re: RemoveBuildingForPlayer bug - Amit_B - 19.07.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Wait, what? Use the map editor.
Wait, what? Read my post again. There's a bug using RemoveBuildingForPlayer, the way of creating it doesn't matter here.


Re: RemoveBuildingForPlayer bug - MP2 - 19.07.2012

Well yeah, RemoveBuildingForPlayer removes all models, it doesn't know/care if it's a static object or a created one. Not a bug. Use RemoveBuildingForPlayer in OnPlayerConnect and create the objects using a streamer.


Re: RemoveBuildingForPlayer bug - Amit_B - 19.07.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Well yeah, RemoveBuildingForPlayer removes all models, it doesn't know/care if it's a static object or a created one. Not a bug. Use RemoveBuildingForPlayer in OnPlayerConnect and create the objects using a streamer.
That's what i've just meant. Even if i'll create objects with streamer, they'll still will not be visible to players who connecting the server. However, object will be visible to player when creating it after using RemoveBuildingForPlayer() on the player. That will cause some players to see the object and some others not, depends on when the object created.


Re: RemoveBuildingForPlayer bug - Basssiiie - 19.07.2012

Quote:
Originally Posted by Amit_B
Посмотреть сообщение
That's what i've just meant. Even if i'll create objects with streamer, they'll still will not be visible to players who connecting the server. However, object will be visible to player when creating it after using RemoveBuildingForPlayer() on the player. That will cause some players to see the object and some others not, depends on when the object created.
Make sure the new objects are created (or streamed with the Streamer Plugin) after RemoveBuildingForPlayer, not before. It might help to spawn the player far away from the pirate ship when he connects, so RemoveBuildingForPlayer isn't conflicting with the Streamer?