Raised This Month: $ Target: $400
 0% 

How to remember value?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 08-07-2013 , 10:11   How to remember value?
Reply With Quote #1

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 
killervictimhstargawpnid
    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 <= 9999kills[killer] += 1
    
else kills[killer] = 1
    
if (kills[killer])
    
timekill[killer] = get_gametime()

    if (!
piercing_shot[killer]) piercing_shot[killer] = 1
    
if (!timeleftpiercing_shot[killer] += 1
    
else piercing_shot[killer] = 1
    piercing_shot
[killer] = min(3piercing_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 >= && (wpnid == CSW_KNIFE))
    {
        
// chain stopper & HS
        
targa 9
    
}
    if (
chain_stopper >= && hs)
    {
        
// chain stopper & HS
        
targa 10
    
}
    if (
chain_stopper >= && hs && (wpnid == CSW_KNIFE))
    {
        
// chain stopper & HS
        
targa 11
    
}
    
    
client_print(idprint_chat"%i"targa)
    
    
    new 
frag1[32], frag2[32], frag3[32], frag4[32], frag5[32], frag6[32], frag7[32], frag8[32], frag9[32]
    
    new 
firstsecondthirdfourthfifthsixthseventheighthninth
    
    
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



Last edited by Randomize; 08-07-2013 at 10:12.
Randomize is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode