SA-MP Forums Archive
Whats wrong with this saving score ? - 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: Whats wrong with this saving score ? (/showthread.php?tid=111378)



Whats wrong with this saving score ? - [LNL]Remulis - 01.12.2009

Quote:

public OnPlayerConnect(playerid)
{
//*********************************TASKU SISTEMA********************************
//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
new playername[256];
GetPlayerName(playerid, playername, 256);
new str[256];
format(str,sizeof(str),"score/%s", playername);
dini_IntSet(str, "warn",0);
format(str,sizeof(str),"score/%s", playername);
if(dini_Exists(str))
{
}
else
{
format(str,sizeof(str),"score/%s", playername);
if(!dini_Exists(str)) dini_Create(str);
dini_IntSet(str, "score",0);
format(str,sizeof(str),"score/%s", playername);
if(!dini_Exists(str)) dini_Create(str);
dini_IntSet(str, "warn",0);
}
new sk;
format(str,sizeof(str),"score/%s", playername);
sk = dini_Int(str,"score");
SetPlayerScore(playerid, sk);