Okay, after some tests i have finished a version with password, given as parameter in c-script and then crypted to get the REAL password for the zip file.
You can get the crypted version when you call the function "encrypt(string)" in c-script. That will create a "password.txt" file, where you can see the encrypted password to copy it in your zip program.
This function is only provided in the "debug version" of the dll, if you release your game you only copy the "release version", without this encryption function.

here is the code for your dll
Code:

...
#define DLL_USE // always define before including adll.h
#include "adll.h"
#include "unzip.h"
#include "iowin32.h"

const char *zipfilename="resource.zip";

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
engine_bind();
return TRUE;
}

#define is_debug_version

int cryption_formula(int value, int value2)
{
return((value*5 + 1)%4);
}

var dll_encrypt(STRING* password)
{
int istrlen, counter=0;

istrlen = int(_FLOAT(str_len(_CHR(password))));

while(counter < istrlen)
{
password->chars[counter] += cryption_formula(counter, password->chars[counter]);
counter ++;
}
return(_VAR(1));
}

#ifdef is_debug_version
DLLFUNC var encrypt(STRING* password)
{
FILE* fp_PW_File;
int istrlen, counter=0;
char cencrypted;

istrlen = int(_FLOAT(str_len(_CHR(password))));

if(!(fp_PW_File = fopen("data\\password.txt", "w+")))
{
return(_VAR(0));
}
while(counter < istrlen)
{
cencrypted = password->chars[counter];
cencrypted += cryption_formula(counter, cencrypted);
fwrite(&cencrypted, sizeof(char), 1, fp_PW_File);
counter ++;
}
fclose(fp_PW_File);
return(_VAR(1));
}

DLLFUNC var decrypt()
{
FILE* fp_PW_File;
int counter = 0,istrlen;
char cencrypted;
char cdecrypted[200];

if(!(fp_PW_File = fopen("data\\password.txt", "r")))
{
return(_VAR(0));
}

strcpy(cdecrypted, "\n\n\n\ndecrypted: ");
istrlen = strlen(cdecrypted);

while(!feof(fp_PW_File))
{
if(!fread(&cencrypted, sizeof(char), 1, fp_PW_File) || counter > 200)
{
break;
}
cencrypted -= cryption_formula(counter, cencrypted);
cdecrypted[counter+istrlen] = cencrypted;
counter ++;
}
fclose(fp_PW_File);

if(!(fp_PW_File = fopen("data\\password.txt", "a")))
{
return(_VAR(1));
}
fwrite(&cdecrypted, sizeof(char), strlen(cdecrypted), fp_PW_File);

fclose(fp_PW_File);
return(_VAR(1));
}
#endif;

int do_extract_currentfile(unzFile uf, char* file_password)
{
char filename_inzip[256];
char* filename_withoutpath;
char* p;
int err=UNZ_OK;
FILE *fout=NULL;
void* buf;
uInt size_buf;

unz_file_info file_info;
uLong ratio=0;
err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);

if (err!=UNZ_OK)
{
error("Error in zipfile. Engine shutdown");
return err;
}

size_buf = file_info.uncompressed_size ;//WRITEBUFFERSIZE;
buf = (void*)malloc(size_buf);
if (buf==NULL)
{
error("Unable to allocate memory. Engine shutdown");
return UNZ_INTERNALERROR;
}
p = filename_withoutpath = filename_inzip;
while ((*p) != '\0')
{
if (((*p)=='/') || ((*p)=='\\'))
filename_withoutpath = p+1;
p++;
}

err = unzOpenCurrentFilePassword(uf,file_password);
err = unzReadCurrentFile(uf,buf,size_buf);
add_buffer(filename_withoutpath,buf);
unzCloseCurrentFile (uf);

return(UNZ_OK);
}

int do_extract(unzFile uf, char* file_password)
{
uLong i;
unz_global_info gi;
int err=UNZ_OK;
FILE *fout=NULL;

err = unzGetGlobalInfo (uf,&gi);
if (err==UNZ_OK)
{
for (i=0;i<gi.number_entry;i++)
{
err = do_extract_currentfile(uf, file_password);
if ( err != UNZ_OK)
break;
if ((i+1)<gi.number_entry)
{
err = unzGoToNextFile(uf);
if (err!=UNZ_OK)
{
break;
}
}
}
}

return(err);
}
//NDEBUG
DLLFUNC var add_zip_resource_PW(STRING* password_str)
{
unzFile uf=NULL;
int err;

dll_encrypt(password_str);

uf = unzOpen(zipfilename);
if (uf == NULL)
{
return _VAR(-1);
}
err = do_extract(uf, _CHR(password_str));
unzClose(uf);
return _VAR(err);
}




and here the c-script
Code:

...
dllfunction add_zip_resource_PW(string1);
dllfunction encrypt(string1);
dllfunction decrypt();

Plugindir = "data";

string zip_string = "Hello! That's the sentence to all resources!";

function main()
{
encrypt(zip_string) //write password.txt
decrypt(); //decrypt password.txt again, and add the real string to the file

//add custom resources from RESOURCE.ZIP
if(add_zip_resource_PW(zip_string) == -1)
{
error("Unable to unzip file to buffer. Engine shutdown.");
exit;
}
...
}



Of course, the encryption formula is not THAT strong , you could improve the encryption of your data to much higher levels. But you have to be aware of none copy-able strings: you have to copy them from the password.txt into your zip-file.

I hope someone is interested in that
Sinthoras