About .txt file - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: About .txt file (
/showthread.php?tid=438804)
About .txt file -
RenovanZ - 22.05.2013
Hey, I want to make a .txt file.
Just like someone Criminal Record, if anyone have a Criminal Records it will log on that .txt file.
The problem is, I want to make a command just like /mdc and if someone use that command, it will show dialog msgbox that contain string on the .txt file.
Anyone can help me?
Re: About .txt file -
radiobizza - 22.05.2013
Take:
PHP код:
#include <a_samp>
#include <YSI\y_ini>
forward YourNameLog(string[]);
public YourNameLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("YourNameLog.txt", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
Re: About .txt file -
RenovanZ - 22.05.2013
Then how I show it as string on Dialog msgbox?
pawn Код:
new string[256];
YourNameLog(string);
format(string, sizeof(string), "%s", string);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Dialog", string, "OK", "");
Like that eh ?
Re: About .txt file -
radiobizza - 22.05.2013
Yeah..
Re: About .txt file -
RenovanZ - 22.05.2013
Oh, thanks.
I'll give you a rep for apreciation.
Re: About .txt file -
radiobizza - 22.05.2013
Your Welcome and don't forget... I'm begginer