Author Topic: Pawn data storage?  (Read 2888 times)

0 Members and 1 Guest are viewing this topic.

Offline ricardo

  • Street Thug
  • *
  • Posts: 14
    • View Profile
Pawn data storage?
« on: January 17, 2010, 03:56:07 am »
Hi,

would someone please tell me what/all methods of permanently storing data we have in pawn, i can only see "Dini.inc" (ini files).

thankyou
« Last Edit: January 17, 2010, 03:58:18 am by ricardo »

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: Pawn data storage?
« Reply #1 on: January 17, 2010, 05:22:39 am »
Since afaik plugins are not yet supported, there is no way of using all those fancy MySQL plugins made for SA-MP, so you're left with storing data in plan text files. For that purpose, you should use the functions from file.inc. Open data stream with fopen, write the stuff you need with fwrite and close the stream with fclose. You can then access the stored data by using fread (don't forget to open and close the stream too).

Offline ricardo

  • Street Thug
  • *
  • Posts: 14
    • View Profile
Re: Pawn data storage?
« Reply #2 on: January 17, 2010, 06:14:27 am »
ok thank you for your reply but flat files would be inappropriate for my needs.