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=345756)
Kills and Deaths -
cod5devious - 26.05.2012
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?
Re: Kills and Deaths -
ikey07 - 26.05.2012
enum pInfo
{
Kills,
Deaths,
}
new UserStates[MAX_PLAYERS][pInfo];
UserStates[playerid][Kills] = dini_Int(file[playerid], "Kills");
Re: Kills and Deaths -
JaTochNietDan - 26.05.2012
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?
Re: Kills and Deaths -
cod5devious - 26.05.2012
Your both helpful +rep.