fixed /stats menu bug ( Damaged Soul ) and added selfkill check in miscstats
This commit is contained in:
parent
fec17424fb
commit
34cfce33a1
|
@ -206,30 +206,33 @@ public client_putinserver(id)
|
||||||
public client_death(killer,victim,wpnindex,hitplace,TK) {
|
public client_death(killer,victim,wpnindex,hitplace,TK) {
|
||||||
|
|
||||||
new headshot = ( hitplace == HIT_HEAD ) ? 1:0
|
new headshot = ( hitplace == HIT_HEAD ) ? 1:0
|
||||||
|
new selfkill = ( killer == victim ) ? 1:0
|
||||||
|
|
||||||
if ( g_firstBlood ) {
|
if ( g_firstBlood ) {
|
||||||
g_firstBlood = 0
|
g_firstBlood = 0
|
||||||
if ( FirstBloodSound ) client_cmd(0,"spk misc/firstblood")
|
if ( FirstBloodSound ) client_cmd(0,"spk misc/firstblood")
|
||||||
}
|
}
|
||||||
if ( (KillingStreak || KillingStreakSound) && !TK ) {
|
if ( (KillingStreak || KillingStreakSound) && !TK ) {
|
||||||
g_streakKills[ killer ][ 0 ]++
|
|
||||||
g_streakKills[ killer ][ 1 ] = 0
|
|
||||||
g_streakKills[ victim ][ 1 ]++
|
g_streakKills[ victim ][ 1 ]++
|
||||||
g_streakKills[ victim ][ 0 ] = 0
|
g_streakKills[ victim ][ 0 ] = 0
|
||||||
new a = g_streakKills[ killer ][ 0 ] - 3
|
if (!selfkill){
|
||||||
if ( (a > -1) && !( a % 2 ) ) {
|
g_streakKills[ killer ][ 0 ]++
|
||||||
new name[32]
|
g_streakKills[ killer ][ 1 ] = 0
|
||||||
get_user_name( killer , name , 31 )
|
new a = g_streakKills[ killer ][ 0 ] - 3
|
||||||
if ( (a >>= 1) > 6 ) a = 6
|
if ( (a > -1) && !( a % 2 ) ) {
|
||||||
if ( KillingStreak ){
|
new name[32]
|
||||||
set_hudmessage(0, 100, 255, 0.05, 0.55, 2, 0.02, 6.0, 0.01, 0.1, 3)
|
get_user_name( killer , name , 31 )
|
||||||
show_hudmessage(0,g_KillingMsg[ a ], name )
|
if ( (a >>= 1) > 6 ) a = 6
|
||||||
|
if ( KillingStreak ){
|
||||||
|
set_hudmessage(0, 100, 255, 0.05, 0.55, 2, 0.02, 6.0, 0.01, 0.1, 3)
|
||||||
|
show_hudmessage(0,g_KillingMsg[ a ], name )
|
||||||
|
}
|
||||||
|
if ( KillingStreakSound ) client_cmd( 0, "spk misc/%s", g_Sounds[ a ] )
|
||||||
}
|
}
|
||||||
if ( KillingStreakSound ) client_cmd( 0, "spk misc/%s", g_Sounds[ a ] )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( MultiKill || MultiKillSound ) {
|
if ( MultiKill || MultiKillSound ) {
|
||||||
if (killer && !TK ) {
|
if (!selfkill && !TK ) {
|
||||||
g_multiKills[killer][0]++
|
g_multiKills[killer][0]++
|
||||||
g_multiKills[killer][1] += headshot
|
g_multiKills[killer][1] += headshot
|
||||||
new param[2]
|
new param[2]
|
||||||
|
@ -292,7 +295,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( wpnindex == 29 && ( KnifeKill || KnifeKillSound ) ) {
|
if ( wpnindex == CSW_KNIFE && ( KnifeKill || KnifeKillSound ) ) {
|
||||||
if ( KnifeKill ) {
|
if ( KnifeKill ) {
|
||||||
new killer_name[32],victim_name[32]
|
new killer_name[32],victim_name[32]
|
||||||
get_user_name(killer,killer_name,31)
|
get_user_name(killer,killer_name,31)
|
||||||
|
@ -303,12 +306,12 @@ public client_death(killer,victim,wpnindex,hitplace,TK) {
|
||||||
if ( KnifeKillSound ) client_cmd(0,"spk misc/humiliation")
|
if ( KnifeKillSound ) client_cmd(0,"spk misc/humiliation")
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( wpnindex == 4 && (GrenadeKill || GrenadeSuicide) ) {
|
if ( wpnindex == CSW_HEGRENADE && (GrenadeKill || GrenadeSuicide) ) {
|
||||||
new killer_name[32],victim_name[32]
|
new killer_name[32],victim_name[32]
|
||||||
get_user_name(killer,killer_name,32)
|
get_user_name(killer,killer_name,32)
|
||||||
get_user_name(victim,victim_name,32)
|
get_user_name(victim,victim_name,32)
|
||||||
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1)
|
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1)
|
||||||
if ( killer != victim ) {
|
if ( !selfkill ) {
|
||||||
if ( GrenadeKill ) show_hudmessage(0,"%L",LANG_PLAYER,g_HeMessages[ random_num(0,3)],killer_name,victim_name)
|
if ( GrenadeKill ) show_hudmessage(0,"%L",LANG_PLAYER,g_HeMessages[ random_num(0,3)],killer_name,victim_name)
|
||||||
}
|
}
|
||||||
else if ( GrenadeSuicide ) show_hudmessage(0,"%L",LANG_PLAYER,g_SHeMessages[ random_num(0,3) ],victim_name)
|
else if ( GrenadeSuicide ) show_hudmessage(0,"%L",LANG_PLAYER,g_SHeMessages[ random_num(0,3) ],victim_name)
|
||||||
|
@ -335,7 +338,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK) {
|
||||||
client_cmd(victim,"spk misc/headshot")
|
client_cmd(victim,"spk misc/headshot")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( DoubleKill || DoubleKillSound ) {
|
if ( (DoubleKill || DoubleKillSound) && !selfkill ) {
|
||||||
new Float:nowtime = get_gametime()
|
new Float:nowtime = get_gametime()
|
||||||
if ( g_doubleKill == nowtime && g_doubleKillId == killer ) {
|
if ( g_doubleKill == nowtime && g_doubleKillId == killer ) {
|
||||||
if ( DoubleKill ) {
|
if ( DoubleKill ) {
|
||||||
|
|
|
@ -1168,7 +1168,7 @@ showStatsMenu( id, iMenuPos ) {
|
||||||
if ( iMenuPos > 0 )
|
if ( iMenuPos > 0 )
|
||||||
iLen += format( g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "BACK" )
|
iLen += format( g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "BACK" )
|
||||||
else
|
else
|
||||||
iLen += format( g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "MORE" )
|
iLen += format( g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "EXIT" )
|
||||||
show_menu( id, iKeyMask, g_sBuffer, -1, "Server Stats" )
|
show_menu( id, iKeyMask, g_sBuffer, -1, "Server Stats" )
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user