bool leftMouseWasDown = false; void onReceive(jjSTREAM &in packet,int clientID) { jjDebug("Packet from clientID " + clientID + " received (" + jjScriptModuleID + ")"); if (jjIsServer) { jjDebug("Broadcasting packet to every other client except clientID " + clientID + " (" + jjScriptModuleID + ")"); jjSendPacket(packet,-clientID); } else { jjDebug("Client has received packet " + " (" + jjScriptModuleID + ")"); } } void onLeftMouseButtonDown() { jjSTREAM packet; string stringPacket = "test string so you can see on a packet viewer"; jjDebug("Player with client ID " + jjLocalPlayers[0].clientID + " sends packet" + " (" + jjScriptModuleID + ")"); packet.push(stringPacket); jjSendPacket(packet); } void onLeftMouseButtonUp() { // } void onMain() { bool leftMouseIsDown = jjKey[1]; if (leftMouseIsDown && !leftMouseWasDown) { leftMouseWasDown = true; onLeftMouseButtonDown(); } else if (!leftMouseIsDown && leftMouseWasDown) { leftMouseWasDown = false; onLeftMouseButtonUp(); } }