RemoveBuildingForPlayer question.
#1

Hello. Currently i have a command which calls "OnPlayerConnect" and OnPlayerConnect(playerid) function removes some buildings for player.

Now, i need to make a command to make the objects appear again for the player, how can i do this? I already tried to call OnPlayerDisconnect and OnPlayerConnect using a command. I tried to call OnIncomingConnection too, but it didn't worked, the buildings were still removed for the player.

I tried to exit the game and i came again on the server with the same id. The buildings appeared, so there is a callback wich i don't know and it creates the default objects (i think).

We all know that OnPlayerConnect is the function where "RemoveBuildingForPlayer" is called, but i need to know which is the callback which creates the buildings for the connecting player.


Thanks and sorry for my low level english.
Reply
#2

They don't get automatically added back again. When a player relogs the buildings are reloaded from the game, SA-MP simply removes them from the game's current memory / game session. You can however use CreateObject to recreate the objects.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)