I have trouble when remember value. I want to remember first value when I killed someone, and when I kill again, the first value moves to the third value. The problem is after killing player, the first value replaced not moved to the second, how was it?
PHP Code:
public dead(id)
{
new killer, victim, hs, targa, wpnid
killer = read_data(1)
victim = read_data(2)
hs = read_data(3)
wpnid = get_user_weapon(killer)
chain_stopper = kills[victim]
new Float:timeleft = get_gametime()-timekill[killer]
if (timeleft <= 9999) kills[killer] += 1
else kills[killer] = 1
if (kills[killer])
timekill[killer] = get_gametime()
if (!piercing_shot[killer]) piercing_shot[killer] = 1
if (!timeleft) piercing_shot[killer] += 1
else piercing_shot[killer] = 1
piercing_shot[killer] = min(3, piercing_shot[killer])
if (kills[killer])
{
targa = 1
}
// piercing shot
if (piercing_shot[killer] == 2)
{
kills[killer] = kills[killer] - 1
targa = 2
}
else if (piercing_shot[killer] == 3)
{
kills[killer] = kills[killer] - 2
targa = 3
}
else if (piercing_shot[killer] == 4)
{
kills[killer] = kills[killer] - 3
targa = 4
}
if (wpnid == CSW_KNIFE)
{
// knife kill
targa = 5
}
if (chain_stopper >= 4)
{
// chain stopper
targa = 6
}
if (hs)
{
// hs
targa = 7
}
if (hs && (wpnid == CSW_KNIFE))
{
// hs with knife
targa = 8
}
if (chain_stopper >= 4 && (wpnid == CSW_KNIFE))
{
// chain stopper & HS
targa = 9
}
if (chain_stopper >= 4 && hs)
{
// chain stopper & HS
targa = 10
}
if (chain_stopper >= 4 && hs && (wpnid == CSW_KNIFE))
{
// chain stopper & HS
targa = 11
}
client_print(id, print_chat, "%i", targa)
new frag1[32], frag2[32], frag3[32], frag4[32], frag5[32], frag6[32], frag7[32], frag8[32], frag9[32]
new first, second, third, fourth, fifth, sixth, seventh, eighth, ninth
if (!first) // this part, first until ninth
first = targa
if (kills[killer] == 2)
second = first
if (kills[killer] == 3)
third = second
if (kills[killer] == 4)
fourth = third
if (kills[killer] == 5)
fifth = fourth
if (kills[killer] == 6)
sixth = fifth
if (kills[killer] == 7)
seventh = sixth
if (kills[killer] == 8)
eighth = seventh
if (kills[killer] == 9)
ninth = eighth
}