07.12.2011, 18:44
How to save your score on /q
?

INI_WriteInt(File,"Score",Score);
new Score[MAX_PLAYERS];
if(!dini_Exists("Score.cfg"))
{
dini_Create("Score.cfg");
}
return 1;
}
Score[playerid] = dini_Int("Score.cfg", Pname);
dini_IntSet("Score.cfg", Pname, Score[playerid]);
stock NewGetPlayerScore(playerid)
{
Score[playerid] = Score[playerid] + GetPlayerScore(playerid);
return Score[playerid];
}
Your question was "How do i save score on /q" you gave very little information, my "wait why are you using score.cfg?" was because you have left out a lot of information, you need to include which file saving system you use for example y_ini, dini etc.. Without that information no one can really give the correct information, if you don't have a file saving system but want one i can link you to some tutorials which will show you all you need to know.
The [ pawn ]: This was an off topic comment basically makes the code more readable and the right colors, as when i read a code i scan read it, was just a comment please don't take it personally. Thanks, -Michael |