Raised This Month: $ Target: $400
 0% 

[solved]block weaponstats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-28-2009 , 00:44   [solved]block weaponstats
Reply With Quote #1

Is it possible to block shoots, damage etc. that is logged with standard weapons?

e.g.:
Code:
05:16:38 L 03/28/2009 - 05:16:38: "Dr.G<1><STEAM_0:0:0><Allies>" triggered "weaponstats" (weapon "spring") (shots "2") (hits "2") (kills "2") (headshots "0") (tks "0") (damage "280") (deaths "0") (score "4")
well the reason why iam asking is because a wanna log sniper rifles thats fire unscoped from when they are scoped, and if it should look right on psychostats with acc. etc. i need to block it and log it as a custom weapon...

- thanks in advance!
__________________

Last edited by Dr.G; 03-29-2009 at 16:23.
Dr.G is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-28-2009 , 20:56   Re: block weaponstats
Reply With Quote #2

i found a way to block it ill post how later

*edit* not totaly solved lol
__________________

Last edited by Dr.G; 03-28-2009 at 21:03.
Dr.G is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-28-2009 , 21:48   Re: block weaponstats
Reply With Quote #3

ok this is how i blocked it and logged a new one:

PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <dodx>
#include <hamsandwich>
#include <fakemeta>
 
#define PLUGIN "wpn stats blocking"
#define VERSION "1.0"
#define AUTHOR "Dr.G"
 
new wpn_id
new shoot_counter
 
new const WPN_CLASSNAME[] = "weapon_spring"
new const NEW_WPN_SHOOTNAME[] = "SOME_WEAPON_NAME"
 
 
public plugin_init() 
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
RegisterHamHam_Weapon_PrimaryAttackWPN_CLASSNAME"func_PrimaryAttack" )
 
 
wpn_id custom_weapon_addNEW_WPN_SHOOTNAME60 NEW_WPN_SHOOTNAME )
}
 
 
public 
func_PrimaryAttack(iEnt)
{
 new 
id pev(iEntpev_owner)
 
 if(
is_user_alive(id) && is_user_connected(id) && get_user_team(id) && !is_user_bot(id))
 {
  
custom_weapon_shot(wpn_idid)
 
  
shoot_counter++
 
  
client_print(id,3,"custom_weapon_shot: %d times"shoot_counter)
 
  return 
HAM_SUPERCEDE
  
}
 
client_print(id,3,"func_PrimaryAttack")
 
 return 
HAM_IGNORED

BUT there is a problem. it calls the function when i hold down my IN_ATTACK key so with one normal hit is logs the custom weapon shot around 5 - 11 times lol.

Code:
03:19:09 og L 03/29/2009 - 03:19:09: "Dr.G<37><STEAM_0:0:0><Allies>" triggered "weaponstats" (weapon "SOME_WEAPON_NAM") (shots "2015") (hits "0") (kills "0") (headshots "0") (tks "0") (damage "0") (deaths "0") (score "0")
03:19:09 og L 03/29/2009 - 03:19:09: "Dr.G<37><STEAM_0:0:0><Allies>" triggered "weaponstats2" (weapon "SOME_WEAPON_NAM") (head "0") (chest "0") (stomach "0") (leftarm "0") (rightarm "0") (leftleg "0") (rightleg "0")
03:19:09 og L 03/29/2009 - 03:19:09: "Dr.G<37><STEAM_0:0:0><Allies>" triggered "time" (time "0:36")
03:19:09 og L 03/29/2009 - 03:19:09: "Dr.G<37><STEAM_0:0:0><Allies>" triggered "latency" (ping "0")
__________________
Dr.G is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-29-2009 , 06:23   Re: block weaponstats
Reply With Quote #4

Would be really better to disable it directly from stats_logging.sma ...

May be you thought those messages were generated by the game ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-29-2009 , 12:06   Re: block weaponstats
Reply With Quote #5

no its cuz i want scoped weapons to be logged as one weapon when they are scoped, and another when they are unscoped. so need to block it logging shoots fired under one condition and log a new one. So this is the way to do it i guess
__________________
Dr.G 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 08:50.


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