reading from scriptfile
#1

hey how can i read my logs in the ban.txt file by /logs and put them in a dialog?
Reply
#2

Assuming that logs are appended to the end of the file (rather than prepended to the beginning of the file) this is completely impractical. Sequential files must be read top-to-bottom and if the file is big it may cause severe lag.

It may work if new lines are prepended to the beginning. That will create the log in reverse order (newest first). You should be able to open the file with io_append. Then move the cursor to the beginning of the file (fseek) before writing.
Reply
#3

i dont understand how new people even decide to start scripting in pawn.. samp should be dead .. its almost 2016 lol .. get on with ur life m8

i can tell you to go read https://sampwiki.blast.hk/wiki/File_Functions but i will probably get yelled at, so go download dini or something by ****** or whatever people use now
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)