So i found a code online somewhere but
1. i don't know if it will send it to every member because
2. it does not work except freezes both games atleast the server and the client
here it is
server script:
if (mplay_connect_status() = 0) { return 0; };
if (argument0 = "dialog") { argument0 = get_open_filename("All Files|*.*","*.*"); };
if (!file_exists(argument0) or argument0 = "") { return 0; };
var file, done, uploadString, count; file = file_bin_open(argument0,0); done = 0;
mplay_data_write(0,chr(3)+filename_name(
argument0));
while (!done) {
if (mplay_data_read(0) = "") {
uploadString = ""; count = 0;
while (file_bin_position(file) < file_bin_size(file) and count < argument1) {
unploadString += chr(file_bin_read_byte(file));
count += 1;
};
if (file_bin_position(file) >= file_bin_size(file)) { done = 1; uploadString = chr(2)+uploadString;
} else { uploadString = chr(1)+uploadString; };
mplay_data_write(0,uploadString);
};
};
return 1;
i had to add the code below to get rid of an error of unknown variable:
unploadString=0
NOW here is the client
if (mplay_connect_status() = 0) { return 0; };
if (string_char_at(string(mplay_data_read(
0)),1) = chr(3)) {
var file, done, count, uploadString;
file = file_text_open_write(working_directory+"\down"+string_delete(mplay_data_read(0),1,
1));
file_text_close(file);
file = file_bin_open(working_directory+"\down"+string_delete(mplay_data_read(0),1,1)
,1);
mplay_data_write(0,"");
done = 0;
while (!done) {
uploadString = string(mplay_data_read(0));
if (string_char_at(uploadString,1) = chr(2)) { done = 1; };
if (uploadString != "") {
count = 2;
while (count < string_length(uploadString)+1) {
file_bin_write_byte(file,ord(string_char_at(uploadString,count)));
count += 1;
};
mplay_data_write(0,"");
};
};
file_bin_close(file);
return 1;
};
return 0;
the file is not even created and both freeze!
so whats happening?
or is there another example for OFFLINE engine, i looked everywhere......











