Saving problems - 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: Saving problems (
/showthread.php?tid=237577)
Saving problems -
tanush - 10.03.2011
delete
Re: Saving problems -
AK47317 - 10.03.2011
maybe u need to put <> in those include..
Re: Saving problems -
tanush - 10.03.2011
still problems
Re: Saving problems -
tanush - 11.03.2011
Please help, i fixed admin but money and score wont save
Re: Saving problems -
Snipa - 11.03.2011
pawn Код:
dini_IntSet(file, "Score", GetPlayerScore(playerid));
Re: Saving problems -
tanush - 11.03.2011
it wont still save
Re: Saving problems -
tanush - 12.03.2011
Oh myy... please help for money and score!
Re: Saving problems -
tanush - 13.03.2011
can someone please help, i had this for 3days
Re: Saving problems -
blackwave - 13.03.2011
pawn Код:
if(gPlayerLogged[playerid] == 1)
{
dini_IntSet(file, "Adminlevel", PlayerData[playerid][AdminLevel]);
dini_IntSet(file, "Score", PlayerData[playerid][Score]);
dini_IntSet(file, "Money", PlayerData[playerid][Cash]);
}
Problem should be there. Just put on OnPlayerConnect:
pawn Код:
gPlayerLogged[playerid] = 1;
Re: Saving problems -
tanush - 13.03.2011
my connect and disconnect pwnt is this
pawn Код:
public OnPlayerConnect(playerid)
{
TogglePlayerClock(playerid, 1);
TextDrawShowForPlayer(playerid,url);
new string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s has joined the server", pname);
SendClientMessageToAll(0xFF0000FF, string);
GetPlayerName(playerid, Name, sizeof(Name));
//register
new file[256];
gPlayerLogged[playerid] = 0;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file),"dmserver/%s.ini", name);
if (!dini_Exists(file))
{
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_INPUT, "Register!", "Welcome to San Andreas Gang War!!, register by entering your password here", "Register", "Leave");
}
if(fexist(file))
{
ShowPlayerDialog(playerid, 101, DIALOG_STYLE_INPUT, "Login!", "Login server by entering your password here", "Login", "Leave");
}
gPlayerLogged[playerid] = 1;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new string[39 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pname);
case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
case 2: format(string, sizeof(string), "%s has left the server. (Kicked!)", pname);
}
SendClientMessageToAll(0xFF0000FF, string);
//register
new file[256];
new name[MAX_PLAYERS];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file),"dmserver/%s.ini", name);
gPlayerLogged[playerid] = 0;
if(gPlayerLogged[playerid] == 1)
{
dini_IntSet(file, "Adminlevel", PlayerData[playerid][AdminLevel]);
dini_IntSet(file, "Score", PlayerData[playerid][Score]);
dini_IntSet(file, "Money", PlayerData[playerid][Cash]);
}
return 1;
}
well the cash and score only never saves

my scriptfile always show this