29.04.2010, 17:02
hi guys...
I got a question...my 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"
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.
I got a question...my 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"
Code:
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); fclose(dat);
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.