Raised This Month: $ Target: $400
 0% 

[SOLVED] KillStreak, Deathmsg_event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wangbochiang
Member
Join Date: Aug 2006
Location: Taiwan - Taichung
Old 03-05-2013 , 08:49   [SOLVED] KillStreak, Deathmsg_event
Reply With Quote #1

I made a killstreak record.
but It won't work, And I don't know why..
can someone help me check my code where I did wrong?
thanks is advance!!

new part:
PHP Code:
new kills[32] = {0,...}
new 
killstreakrecord[32] = {0,...}
new 
currentKS,KSrec
init part:
PHP Code:
register_event("DeathMsg","DeathMsg_event""a")
currentKS 0;
KSrec 0
Deathmsg_event part:
PHP Code:
public DeathMsg_event() {
    new 
killer_name[32], victim_name[32]
    
get_user_name(read_data(1),killer_name,31)
    
get_user_name(read_data(2),victim_name,31)
    new 
killer read_data(1)
    new 
victim read_data(2)

    
kills[killer] += 1;
    
kills[victim] = 0
    
    if (
kills[killer] > killstreakrecord[killer]) 
    {
        
killstreakrecord[killer] = kills[killer]; 
    }
    
currentKS kills[killer];
    
KSrec killstreakrecord[killer];
    
        
//debug
    
client_print(killer,print_chat,"[DEBUG] killstreak: %d killstreak Record: %d",kills[killer],killstreakrecord[killer]);
    
client_print(killer,print_chat,"[DEBUG] killstreak: %d killstreak Record: %d",currentKS,KSrec);
    return 
PLUGIN_CONTINUE;

When I test it even DEBUG msg is not apper.. where did i do wrong? thanks all the pros helping me...

sorry my bad english. ><



SOLVED:
I solved the problem myself.
__________________
Catch me on : @twitter

Last edited by wangbochiang; 03-06-2013 at 13:19. Reason: Solved the problem
wangbochiang is offline
Send a message via MSN to wangbochiang Send a message via Yahoo to wangbochiang Send a message via Skype™ to wangbochiang
 



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 21:37.


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