Any idea players' most kill store in dini
#1

I have been searching for a while, anybody give me idea how to save highest killing spree n dini?
Reply
#2

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"));
Reply
#3

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?
Reply
#4

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
Reply
#5

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.
Reply
#6

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
Reply
#7

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?
Reply
#8

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");
}
Reply
#9

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".
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)