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.
__________________