Whats wrong with this saving score ?
#1

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);

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)