17.09.2010, 18:38
(
Последний раз редактировалось titanak; 19.09.2010 в 19:03.
Причина: added saving code
)
Thanks For Everyone Who Helped ! got work this now
while(fread(example, string))
{
new string235[256];
format(string235, 256, "%s\r\n", string);
//Other code
}
fclose(example);
if(strcmp(cmd, "/chatlog", true) == 0) {
new string[64]; // Create the string to store the read text in
new File:example = fopen("text.txt", io_read); // Open the file
fread(example, string); // Fread from the file and store what's read in 'string'
while(fread(example, string))
{
new string235[256];
format(string235,sizeof string235,"%s\r\n",string);
ShowPlayerDialog(playerid,8329,DIALOG_STYLE_LIST,"Text",string235,"Okei","Cancel");
}
fclose(example);
return 1;
}
if(strcmp(cmd, "/chatlog", true) == 0) {
new string[64]; // Create the string to store the read text in
new File:example = fopen("text.txt", io_read); // Open the file
fread(example, string); // Fread from the file and store what's read in 'string'
new string235[256];
while(fread(example, string))
{
format(string235,sizeof string235,"%s\r\n",string);
}
ShowPlayerDialog(playerid,8329,DIALOG_STYLE_LIST,"Chat Logs",string235,"Okei","Cancel");
fclose(example);
return 1;
}
if(strcmp(cmd, "/chatlog", true) == 0)
{
new string[128];
new string235[512];
new File:example = fopen("text.txt", io_read);
while(fread(example, string))
{
strcat(string235, string, sizeof(string235));
}
fclose(example);
ShowPlayerDialog(playerid,8329,DIALOG_STYLE_LIST,"Chat Logs",string235,"Okei","Cancel");
return 1;
}