About .txt file
#1

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?
Reply
#2

Take:
PHP код:
#include <a_samp>
#include <YSI\y_ini>

forward YourNameLog(string[]);

public 
YourNameLog(string[])
{
    new 
entry[256];
    
format(entrysizeof(entry), "%s\n",string);
    new 
File:hFile;
    
hFile fopen("YourNameLog.txt"io_append);
    
fwrite(hFileentry);
    
fclose(hFile);

Reply
#3

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 ?
Reply
#4

Yeah..
Reply
#5

Oh, thanks.
I'll give you a rep for apreciation.
Reply
#6

Your Welcome and don't forget... I'm begginer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)