okey, i'm trying to understand, but i'm a bit slow on this one
for some reason i don't know.
that's what i have so far (just a snippet of the main function):
Code:
public client_damage(attacker,victim,damage,wpnindex,hitplace,TA){
if(get_cvar_num("amx_ubergarand") == 1){
if((wpnindex == DODW_GARAND) && (is_user_alive(victim) == 1)){
garandDeathMsg = get_user_msgid("DeathMsg")
set_msg_block(garandDeathMsg,BLOCK_ONCE)
user_kill(victim)
if(TA == 0){
new aKills = dod_get_user_kills(attacker)
dod_set_user_kills(attacker,aKills+1)
}
message_begin( MSG_ALL, get_user_msgid("DeathMsg"),{0,0,0},0)
write_byte(attacker)
write_byte(victim)
write_byte(wpnindex)
message_end()
}
}
}
so it would be:
Code:
new blockSuicide = 0
.
.
.
public client_damage(attacker,victim,damage,wpnindex,hitplace,TA){
if(get_cvar_num("amx_ubergarand") == 1){
if((wpnindex == DODW_GARAND) && (is_user_alive(victim) == 1)){
garandDeathMsg = get_user_msgid("DeathMsg")
set_msg_block(garandDeathMsg,BLOCK_ONCE)
blockSuicide = 1
user_kill(victim)
if(TA == 0){
new aKills = dod_get_user_kills(attacker)
dod_set_user_kills(attacker,aKills+1)
}
message_begin( MSG_ALL, get_user_msgid("DeathMsg"),{0,0,0},0)
write_byte(attacker)
write_byte(victim)
write_byte(wpnindex)
message_end()
}
}
}
.
.
.
public plugin_log()
{
if (blockSuicide)
{
blockSuicide = 0
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
or do i get that wrong?
by the way, thanks for your reply, bailopan