if(gameWindowExists() && !$Server::Dedicated){ if(!%client) exec("Add-Ons/Map_CityRPG/CityRPGSpawnGui.gui");}
Everyone is missing the obvious issue that executing a gui on the server is not going to open it on the client.
I want each client to see the gui when they spawn. so,is this right?Code: [Select]if(gameWindowExists() && !$Server::Dedicated){ if(!%client) exec("Add-Ons/Map_CityRPG/CityRPGSpawnGui.gui");}
package Whatever { function GameConnection::SpawnPlayer(%this, ....) { commandToClient(%this, 'openMyGui'); return parent::SpawnPlayer(%this, ....) } }
exec("Add-Ons/Map_CityRPG/CityRPGSpawnGui.gui");function clientCmdOpenMyGui() { Canvas.pushDialog(CityRPGSpawnGui); }