Kills and Deaths
#1

pawn Код:
IsLogged[playerid] = true;
            GivePlayerMoney(playerid, dini_Int(file[playerid], "Money"));
            SetPlayerScore(playerid, dini_Int(file[playerid], "Score"));
            AdminLevel[playerid] = dini_Int(file[playerid], "Admin");
            Banned[playerid] = dini_Int(file[playerid], "IGBAN");
            TimeBanned[playerid] = dini_Int(file[playerid], "TimeBanned");
            TimeKicked[playerid] = dini_Int(file[playerid], "TimeKicked");
            if(Banned[playerid] == 1)
How do I add kills to that so when they login in, it shows saved kills and deaths

I already done
pawn Код:
dini_IntSet(file[playerid], "Money", GetPlayerMoney(playerid));
        dini_IntSet(file[playerid], "Score", GetPlayerScore(playerid));
        dini_IntSet(file[playerid], "Kills", PlayerInfo[playerid][Kills]);
        dini_IntSet(file[playerid], "Deaths", PlayerInfo[playerid][Deaths]);
        dini_IntSet(file[playerid], "Admin", AdminLevel[playerid]);
        dini_IntSet(file[playerid], "IGBAN", Banned[playerid]);
        dini_IntSet(file[playerid], "TimeBanned", TimeBanned[playerid]);
        dini_IntSet(file[playerid], "TimeKicked", TimeKicked[playerid]);
and
pawn Код:
enum pInfo
{
      Kills,
      Deaths,
}
How do I add kills and deaths to the top code?
Reply
#2

enum pInfo
{
Kills,
Deaths,
}
new UserStates[MAX_PLAYERS][pInfo];

UserStates[playerid][Kills] = dini_Int(file[playerid], "Kills");
Reply
#3

The same as you've done so far:

pawn Код:
PlayerInfo[playerid][Kills] = dini_Int(file[playerid], "Kills");
PlayerInfo[playerid][Deaths] = dini_Int(file[playerid], "Deaths");
Could you not have at least attempted it before asking?
Reply
#4

Your both helpful +rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)