Posts: 82
Threads: 16
Joined: Apr 2011
Reputation:
0
I am having a huge problem trying to get ladmin to save scores i have edited it like one guy gave an tutorial how to save ladmin scores but it still didnt work now i simply tried to do this but it gives me errors.....
Can someone please give me the correct way to save scores in LAdmin........
}
#if defined SAVE_SCORE
new file:LAdminfile, filepath[256], string[256], Score;
getscore(Score);
format(filepath,sizeof(filepath,"ladmin/users/Score/%s.txt",filename);
LAdminfile = fopen(filepath);
format(string,sizeof(string),"[%d] %s\r\n"Score,text);
fwrite(LAdminfile,string);
fclose(LAdminfile);
#endif
return 1;
}
Posts: 3,488
Threads: 16
Joined: Jun 2007
Reputation:
0
What version do you have?
Posts: 82
Threads: 16
Joined: Apr 2011
Reputation:
0
05.05.2011, 14:16
(
Последний раз редактировалось [$A$]W33D$P33D; 05.05.2011 в 14:50.
)
Link is below at bottom of page
Posts: 82
Threads: 16
Joined: Apr 2011
Reputation:
0
I GET THIS ERROR NOW
F:\GTA-SA\Samp\filterscripts\ladmin4v2.pwn(6805) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
LoginPlayer(playerid);
{
if(ServerInfo[GiveMoney] == 1) {ResetPlayerMoney(playerid); GivePlayerMoney(playerid, dUserINT(PlayerName2(playerid)).("money") ); }
dUserSetINT(PlayerName2(playerid)).("loggedin",1);
PlayerInfo[playerid][Deaths] = (dUserINT(PlayerName2(playerid)).("deaths"));
PlayerInfo[playerid][Kills] = (dUserINT(PlayerName2(playerid)).("kills"));
PlayerInfo[playerid][Level] = (dUserINT(PlayerName2(playerid)).("level"));
PlayerInfo[playerid][hours] = dUserINT(PlayerName2(playerid)).("hours");
PlayerInfo[playerid][mins] = dUserINT(PlayerName2(playerid)).("minutes");
PlayerInfo[playerid][secs] = dUserINT(PlayerName2(playerid)).("seconds");
SetPlayerScore(playerid, dUserINT(PlayerName2(playerid)).("score"));
PlayerInfo[playerid][Registered] = 1;
PlayerInfo[playerid][LoggedIn] = 1;
}
if(PlayerInfo[playerid][Level] > 0)
{
format(string,sizeof(string),"ACCOUNT: You have been automatically logged in. (Level %d)", PlayerInfo[playerid][Level] );
SendClientMessage(playerid,green,string);
}
else SendClientMessage(playerid,green,"ACCOUNT: You have been automatically logged in.");
}
else SendClientMessage(playerid, green, "ACCOUNT: This nickname is registed, you can now login by typing /login [password]");
}
return 1;
}
Posts: 82
Threads: 16
Joined: Apr 2011
Reputation:
0
LOL oops forgot about that thankyou i will go see if it works now will let u know....
Posts: 82
Threads: 16
Joined: Apr 2011
Reputation:
0
IDK it frustrates me so much ty for your help but it still doesnt save the score im loosing it
Posts: 82
Threads: 16
Joined: Apr 2011
Reputation:
0
it compiled but still nothing it doesnt save
Posts: 82
Threads: 16
Joined: Apr 2011
Reputation:
0
TY Man i got it to work you are awsome!!!!
Posts: 1,942
Threads: 89
Joined: Nov 2010
Reputation:
0
I am using the old version of Ladmin and its saving score without doing anything.