saving score help
#1

so here i made a simple save cop score but there is a problem . it save's all the scores that player take, i mean and rob scores i just want to save the cop scores how can i do that ??


here is my code
pawn Код:
public OnPlayerConnect(playerid)
{
    new pname[128];
    new file[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), savefolder,pname);
    if(!dini_Exists(file)) {
        dini_Create(file);
        dini_IntSet(file, "Copskill", 0);
        SetPlayerScore(playerid, dini_Int(file, "Copskill"));
    }
    else {
        SetPlayerScore(playerid, dini_Int(file, "Copskill"));
    }
    return 1;
}
Reply
#2

Could you explain a little bit better. As i see it right now i can see that it's
Quote:

dini_IntSet(file, "Copskill", 0);

Maybe you should change the number to like
Quote:

public OnPlayerConnect(playerid)
{
new pname[128];
new file[128];
save file [THEFILE]
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), savefolder,pname);
if(!dini_Exists(file)) {
dini_Create(file);
dini_IntSet(file, "Copskill", 1);
SetPlayerScore(playerid, dini_Int(file, "Copskill"));
}
else {
SetPlayerScore(playerid, dini_Int(file, "Copskill"));
}
return 1;
}

Reply
#3

no the problem is that i just want to make it to save just the cop scores not and rob scores etc..
how can i do that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)