users.txt, How wood i read and write in it?
#9

Basic:
pawn Код:
new
    var1,
    var2,
    var3;

new resultline[256];
fread(file, resultline);

sscanf(resultline, "p<,>iii", var1, var2, var3);
If you use an enum for your data, it can be done even simpler (requires the sscanf2 plugin, though).
Please read the sscanf topic here: https://sampforum.blast.hk/showthread.php?tid=120356
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)