Getting Info from .CFG 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Getting Info from .CFG file (
/showthread.php?tid=254634)
Getting Info from .CFG file -
Alvord - 11.05.2011
Deleted.
AW: Getting Info from .CFG file -
Nero_3D - 11.05.2011
just
pawn Код:
new File: gFile = fopen("filename.cfg", io_read);
if(gFile) {
new line = 1, tmp[128];
while(fread(gFile, tmp)) ++line;
fclose(gFile);
}
line would contain your wanted number
Re: Getting Info from .CFG file -
Alvord - 11.05.2011
Thanks.
How about saving a new line? How would I get the next house ID to be used in the CFG file?
For example, when a player types "/buyhouse" the house ID will be automatically be 3, with regards to the example I posted.
Re: Getting Info from .CFG file -
Alvord - 12.05.2011
bump bump*
Re: Getting Info from .CFG file -
SchurmanCQC - 12.05.2011
Just use ini files....