Kills and Deaths?
#1

So I created a login system but how do I save kills and deaths,

it like this:
pawn Код:
if(IsPlayerConnected(playerid)) {
        dini_IntSet(file[playerid], "Money", GetPlayerMoney(playerid));
        dini_IntSet(file[playerid], "Score", GetPlayerScore(playerid));
        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]);
How do I add kills and deaths to it?
Reply
#2

Seriously...

If you have a enum create a pKills and Pdeaths in it if you dont add this

pawn Код:
enum pInfo
{
      pKills,
      pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Okay so now I'm guessing you can work out how to save/load as I havnt used Dini in ages and cant remember the Syntax.

pawn Код:
dini_IntSet(file[playerid], "Kills", PlayerInfo[playerid][pKills]);
                 dini_IntSet(file[playerid], "Deaths", PlayerInfo[playerid][pDeaths]);
If you dont understand how to save/load it give me an example to follow.

And enjoy the code.
Reply
#3

I'm new to scripting but rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)