What solution should fit better and cause no bugs or unwanted outcome?
#1

I'm making a lot&house system in my gamemode. This would include both removing and creating objects.
The question is: how shall I execute them?
My thoughts are removing objects under OnPlayerConnect, and creating objects (houses) with commands.
After a server restart would RemoveBuildingForPlayer actually remove a created house too if it's modelid is the same as the previously deleted one? And would the server crash because of it?

I haven't really started the code so I cannot show it to you. I'm asking because I don't want to struggle with making it and then fail, so my question would appear here anyway.
Would a HouseCreated[houseid] variable solve this problem if it exists? And should I and can I even make a stock function to remove objects?
Reply
#2

EDIT: Figured it out, it should be working without bugs or "not showing" if the created object's ID is different from the deleted ones. As object-loading would be happening under OnGameModeInit, use of a different modelid wouldn't cross over with the RemoveBuildingForPlayer function under OnPlayerConnect
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)