SA-MP Forums Archive
creating TXT files? - 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: creating TXT files? (/showthread.php?tid=153598)



creating TXT files? - WardenCS - 09.06.2010

Hey,i want to make an faction system,like it will do txtfile everytime ya type /createfaction [name] [leaders name]
and the textfile name would be factions name,and how to load them too then?
thanks.


Re: creating TXT files? - clavador - 09.06.2010

Quote:
Originally Posted by Fog™
Hey,i want to make an faction system,like it will do txtfile everytime ya type /createfaction [name] [leaders name]
and the textfile name would be factions name,and how to load them too then?
thanks.
Use Dini or Dudb to do this or read about file functions in the SAMP wiki:

https://sampwiki.blast.hk/wiki/File_Functions

The best advice is to use Dini:

Код:
// To create a faction name

dini_Set("faction","faction1name","factionone");
dini_Set("faction","faction2name","factiontwo");

// To retrieve it

dini_Int("faction","faction1name")
Just a simple example.