There are for sure more that one way to achieve this. I am not familiar with smartfox server's setup to help you on that regard & there is no point on writing about all the possible routes you could take since this topic may result in a huge discussion.
No matter what way of networking setup you do you should have to 'simulate' that destruction on the client.
Assuming that you have a function that destroys a house for whatever reason on your clientside code:
void Demolish(Object objectToDemolish, Type demolishType) {
// Do clientside gameengine stuff
}
To continue here I will assume the following scenario is happening in your game:
1) There are two players in the game and each player character is a tank
2) player 1 fires at a house
2.5) player 1 needs to notify the server for either the destruction or the firing based on the architecture of the game
3) the house is destroyed on player 1's client
4) player 2 is notified on the event
5) the house is destroyed on player 2's client
on step 3 since the house demolition occurs on the same client from where the event (step 2) is triggered it is fairly easy to find your house game object call your function with it as a parameter and the same goes with the demolition type.
However, player 2 will have be notified from the server with certain data in order for the client to know what to do. By using those data you will have to find the game object that needs to be demolished on the second client.
For example:
Object findGameObject(objectId) {
// should return a game object based on its object id
return GameObjectHolder.getById(objectId);
}
void HandleServerMessage(message) {
switch(message.code) {
case "object_destroy"
Demolish(findGameObject(message.data.objectId), message.data.type);
break;
// other networking related procedures here
defaults:
break;
}
}
Now whether player 1 will also notified by the server or by the client itself is another story, that is based on your architecture.
case authoritative server: you do not notify the server from firing client 1 for the destruction, but you notify it for the firing.
action: that means that the server will calculate where that firing will destroy an object. If it does, all clients will be notified of the destruction from the server, including client 1.
case non authoritative server: you do notify the server on destruction, so that the server skips that calculation. Plus you want an immediate response on the game UI, so that it does not appear laggy.
action: call the firing client 1's destruction method on collision between the bullet & the object. All other clients should be notified through server anyway. Just make sure not to try to destroy twice the same object.