| Blockland Forums > Modification Help |
| Calling GameConnection from the client? |
| (1/1) |
| Daenth:
So I used trace(1); to check out how something is done when your avatar changes and I noticed 7902 as the very first number in the parentheses. Using .getClassName(); I figured out that it was the GameConnection number. So, when I go to use that serverCmd I found, what should be in the parentheses? It contains a bunch of values that I have figured out what they are for but I need to know what to put as the first number in the parentheses. |
| Chrono:
A client, if you're doing this from the console, try something like serverCmdFirePants(findClientByName("blockhead"),45); |
| Daenth:
--- Quote from: Chrono on July 15, 2011, 02:16:23 AM ---A client, if you're doing this from the console, try something like serverCmdFirePants(findClientByName("blockhead"),45); --- End quote --- From the clients end, how would you do this? Or is it automatically done? |
| Chrono:
--- Quote from: Daenth on July 15, 2011, 02:21:45 AM ---From the clients end, how would you do this? Or is it automatically done? --- End quote --- Client's end? You don't even need that part. In fact, if you could put in a value for a Gameconnection on the client end then you could potentially abuse any server. commandToServer('function name without ServerCmd',args, and, stuff); For example, commandToServer('useTool',0); will pull out your hammer, and that number (7902 in your case) is automatically defined by the server, being the client that called the command. Simplified: Client does commandToServer('UseTool',0); Server gets ServerCmdUseTool(7902,0); |
| Daenth:
--- Quote from: Chrono on July 15, 2011, 02:28:04 AM ---Client's end? You don't even need that part. In fact, if you could put in a value for a Gameconnection on the client end then you could potentially abuse any server. commandToServer('function name without ServerCmd',args, and, stuff); For example, commandToServer('useTool',0); will pull out your hammer, and that number (7902 in your case) is automatically defined by the server, being the client that called the command. Simplified: Client does commandToServer('UseTool',0); Server gets ServerCmdUseTool(7902,0); --- End quote --- Ah, I see. |
| Navigation |
| Message Index |