Raised This Month: $ Target: $400
 0% 

block logging of "suicide"?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 10-04-2004 , 17:49  
Reply With Quote #3

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
FeuerSturm is offline
 



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 17:19.


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