Raised This Month: $ Target: $400
 0% 

Log weapon & log damage with amxx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-31-2006 , 17:47   Log weapon & log damage with amxx
Reply With Quote #1

how can i let amxx log a kill
because if you use fakedamage the player is killed with world & not with the weapon
I need it for the He grenade multiplier

thx in advance
__________________
- Bye bye!
nightscreem is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 05-31-2006 , 23:53  
Reply With Quote #2

well you could allways just add an if func call that when someone kills some-one else to add a frag to their score... and that ussually will log that kill into their ranks.
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-01-2006 , 08:27  
Reply With Quote #3



Code:
public createKill(id, attacker, weaponDescription[] ) {     new FFon = get_cvar_num("mp_friendlyfire")         if (FFon && get_user_team(id) == get_user_team(attacker))     {         set_user_frags(attacker, get_user_frags(attacker) - 1)         client_print(attacker,print_center,"You killed a teammate")         new money = cs_get_user_money(attacker)         if (money != 0)             cs_set_user_money(attacker,money - 150,1)     }     else if (get_user_team(id) != get_user_team(attacker))     {         set_user_frags(attacker, get_user_frags(attacker) + 1)         new money = cs_get_user_money(attacker)         if (money < 16000)             cs_set_user_money(attacker,money + 300,1)     }             logKill(attacker, id, weaponDescription)         //Kill the victim and block the messages     set_msg_block(g_iMsgDeathMsg,BLOCK_ONCE)     set_msg_block(g_iMsgScoreInfo,BLOCK_ONCE)     user_kill(id)         //user_kill removes a frag, this gives it back     set_user_frags(id,get_user_frags(id) + 1)         //Replaced HUD death message     message_begin(MSG_ALL,g_iMsgDeathMsg,{0,0,0},0)     write_byte(attacker)     write_byte(id)     write_byte(0)     write_string(weaponDescription)     message_end()         //Update killers scorboard with new info     message_begin(MSG_ALL,g_iMsgScoreInfo)     write_byte(attacker)     write_short(get_user_frags(attacker))     write_short(get_user_deaths(attacker))     write_short(0)     write_short(get_user_team(attacker))     message_end()         //Update victims scoreboard with correct info     message_begin(MSG_ALL,g_iMsgScoreInfo)     write_byte(id)     write_short(get_user_frags(id))     write_short(get_user_deaths(id))     write_short(0)     write_short(get_user_team(id))     message_end()     } // ------- LOG KILL------------ public logKill(id, victim, weaponDescription[] ) {     new namea[32],namev[32],authida[35],authidv[35],teama[16],teamv[16]         //Info On Attacker     get_user_name(id,namea,31)     get_user_team(id,teama,15)     get_user_authid(id,authida,34)         //Info On Victim     get_user_name(victim,namev,31)     get_user_team(victim,teamv,15)     get_user_authid(victim,authidv,34)         //Log This Kill     if(id != victim)     {         log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"",         namea,get_user_userid(id),authida,teama,namev,get_user_userid(victim),authidv,teamv, weaponDescription )     }     else     {         log_message("^"%s<%d><%s><%s>^" committed suicide with ^"%s^"",         namea,get_user_userid(id),authida,teama, weaponDescription )     } }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 06-01-2006 , 11:12  
Reply With Quote #4

Ok thx but not really what i mean, i asked for the wrong thing
it logs my weapon
but i use fakedamage to a grenade but the damage that is done
is not the damage that is registered in the stats and such
it 's the normal damage that's been used
__________________
- Bye bye!
nightscreem is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 06-01-2006 , 18:15  
Reply With Quote #5

Hawk552: nice steal from superhero ;)


nightscreem: you want to block the hlds log message saying the player got killed by the world? There is a plugin called "vehiclekills" that does that, you might want to look at it.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 06-02-2006 , 10:38  
Reply With Quote #6

thx gonna try that
__________________
- Bye bye!
nightscreem is offline
Reply



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 16:29.


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