SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

Thread Tools Display Modes
Old 29/04/2010, 05:02 PM   #1
Sascha's Avatar
Join Date: Jul 2009
Location: Germany
Posts: 1,494
Reputation: 70
Default DataBase

hi guys...
I got a actually "database" doesn't save the money and so in it...(yea I already added such a line for it)
So I wanted to make a new file (in a different folder) with the player's name...
So I made it create the file and wrote that at "OnPlayerConnect"

new File:dat;
new string[256], msg[256];
new nam[MAX_PLAYER_NAME], m;
GetPlayerName(playerid, nam, sizeof(nam));
format(string, sizeof(string), "%s.txd", nam);
dat = fopen(string, io_write);
m = GetPlayerMoney(playerid);
format(msg, sizeof(msg), "Money: %f\r\n", m);
fwrite(dat, msg);
But when I leave the server with some money then, it won't save it in the file...
Also I don't know how to make it read the "Money" line only as I want to store more than only the Money information in it and want the player
to give the stored datas when he/she logs in.
Don't bother to contact me, I'm out of SA-MP
Sascha is offline  

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FS/MySQL/PHP]IP Database v0.2 Mujib Filterscripts 16 09/08/2010 09:31 AM
[MySQL] How do I set up a database? Lejo Help Archive 2 09/04/2010 06:20 AM
[HELP] Convert .ini to a SQL database Kastranova Help Archive 1 21/03/2010 01:00 AM
Police Database... Awerop Help Archive 0 17/02/2010 03:57 PM
[HELP] Adding a SQL database Jimmyhead521 Help Archive 0 29/12/2009 11:09 PM

All times are GMT. The time now is 01:33 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.