| Blockland Forums > Modification Help |
| GUI Question |
| << < (2/3) > >> |
| Nexus:
--- Quote from: Mapster on January 27, 2012, 12:43:25 AM ---How would somone go about requesting it anyway? --- End quote --- First the client sends the request like this: commandtoserver('gimmeData'); Then the server receives it, and sends the data back by doing: function servercmdgimmeData(%client) { %data = getdata(); commandtoclient(%client, 'givinData', %data); } Finally, the client receives the data like so: function clientcmdgivinData(%data) { dataObtained(%data); } |
| Mapster:
Could you make it so they automatically request it when they connect to the server? Like have the server forces them to request it or something weird. |
| Nexus:
--- Quote from: Mapster on January 27, 2012, 03:26:56 PM ---Could you make it so they automatically request it when they connect to the server? Like have the server forces them to request it or something weird. --- End quote --- How would you define automatic? You can have the server just send the data sure, which would basically skip to the commandtoclient(%client, 'givinData', %data); However, if the client does not have the function clientcmdgivinData, then nothing will happen. |
| Mapster:
Automatic as in, when the connect to the server it happens on its own. |
| tkepahama:
--- Quote from: Mapster on January 27, 2012, 08:06:19 PM ---Automatic as in, when the connect to the server it happens on its own. --- End quote --- Wouldn't that be ServerConnection::onClientJoin? or what? |
| Navigation |
| Message Index |
| Next page |
| Previous page |