Kills and Deaths? - 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)
+--- Thread: Kills and Deaths? (
/showthread.php?tid=345677)
Kills and Deaths? -
cod5devious - 25.05.2012
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?
Re: Kills and Deaths? -
IceCube! - 25.05.2012
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.
Re: Kills and Deaths? -
cod5devious - 26.05.2012
I'm new to scripting but rep+