Saving Highest Killing Spree in Dini -
[ANGEL]_Rocko - 06.11.2012
I have been searching for a while, anybody give me idea how to save highest killing spree n dini?
Re: Any idea players' most kill store in dini -
redreaper666 - 06.11.2012
You need to set an PlayerVar this you can set in dini then like this:
dini_IntSet(acc, "MostKills", GetPVarInt(playerid, "MostKills"));
to load it again:
SetPVarInt(playerid, "MostKills", dini_Int(acc, "MostKills"));
Re: Any idea players' most kill store in dini -
[ANGEL]_Rocko - 06.11.2012
Quote:
Originally Posted by redreaper666
You need to set an PlayerVar this you can set in dini then like this:
dini_IntSet(acc, "MostKills", GetPVarInt(playerid, "MostKills"));
to load it again:
SetPVarInt(playerid, "MostKills", dini_Int(acc, "MostKills"));
|
Hmmm. then?
Re: Any idea players' most kill store in dini -
redreaper666 - 06.11.2012
Thats all it saves and load the Var if you dont know how to create a account search for some filterscripts.
for each kill means:
onplayerdeath(killerid,playerid)
SetPVarInt(killerid,"Mostkills",+1);
or
SetPVarInt(killerid,"Mostkills",++);
at disconnecting you can make a save player stock
so it saves the Var till he reconnects
Re: Any idea players' most kill store in dini -
[ANGEL]_Rocko - 06.11.2012
Quote:
Originally Posted by redreaper666
Thats all it saves and load the Var if you dont know how to create a account search for some filterscripts.
for each kill means:
onplayerdeath(killerid,playerid)
SetPVarInt(killerid,"Mostkills",+1);
or
SetPVarInt(killerid,"Mostkills",++);
at disconnecting you can make a save player stock
so it saves the Var till he reconnects
|
am using ladmin and i can understand what u mean.
But i did not mean not all kills, kills player made in row without single death.
Re: Any idea players' most kill store in dini -
redreaper666 - 06.11.2012
then:
onplayerdeath(killerid,playerid)
SetPVarInt(killerid,"Mostkills",+1);
SetPVarInt(playerid,"Mostkills",0);
means if YOU (playerid) die your mostkills is set to 0
if youre killer(killerid) kills you he gets one Mostkills more till he dies
Re: Any idea players' most kill store in dini -
[ANGEL]_Rocko - 06.11.2012
Quote:
Originally Posted by redreaper666
then:
onplayerdeath(killerid,playerid)
SetPVarInt(killerid,"Mostkills",+1);
SetPVarInt(playerid,"Mostkills",0);
means if YOU (playerid) die your mostkills is set to 0
if youre killer(killerid) kills you he gets one Mostkills more till he dies
|
So by this way i kill 5 players, my mostkills will be 5
And then again i kill 3 players my most kill will be 3
It will change my most kill from 5 to 3. and i dont want that.
How to make it save no short killing streak?
Re: Any idea players' most kill store in dini -
redreaper666 - 06.11.2012
no it doesnt
it adds as long as you live all kills you make
ONLY if youre die youre killing spree is set to 0 again
if you mean like after dieing that youre mostkills should be still 5 kills you need to do somthing else
new mostkillsnew, mostkillsold;
you need to use
if(GetPVarInt(playerid,"mostkillsnew")> GetPVarInt(playerid"mostkillsold"))
{
SetPVarInt("mostkillsold", GetPVarInt(playerid,"mostkillsnew");
}
Re: Any idea players' most kill store in dini -
[ANGEL]_Rocko - 06.11.2012
Quote:
Originally Posted by redreaper666
no it doesnt
it adds as long as you live all kills you make
ONLY if youre die youre killing spree is set to 0 again
|
Sorry, you did'nt understand me.
Playerx kills 5 players in row, so in /stats he should have "Most Kills In A Row: 5"
He dies or disconnects.
Playerx this time kills 4 players in a row, now in /stats his "Most kills in round: 5" should
not change to lower one "Most Kills in a Round: 4".
Re: Any idea players' most kill store in dini -
redreaper666 - 06.11.2012
yoyo it aint about just adding kills
its about mostkills in a row after death aswell
if you mean like after dieing that youre mostkills should be still 5 kills you need to do somthing else
new mostkillsnew, mostkillsold;
you need to use
if(GetPVarInt(playerid,"mostkillsnew")> GetPVarInt(playerid"mostkillsold"))
{
SetPVarInt("mostkillsold", GetPVarInt(playerid,"mostkillsnew");
}
but then you have to change the dini one to mostkillsold instead of mostkills