Raised This Month: $47 Target: $400
 11% 

Ham_Killed skipping frags?


Post New Thread Reply   
 
Thread Tools Display Modes
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 01-06-2017 , 07:57   Re: Ham_Killed skipping frags?
Reply With Quote #11

Quote:
Originally Posted by edon1337 View Post
Weird, I've read that Ham_Killed doesn't get called on grenades.
AFAIK, DeathMsg is the one which will not be called on grenade kill.
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-06-2017 , 08:14   Re: Ham_Killed skipping frags?
Reply With Quote #12

Quote:
Originally Posted by JoKeR LauGh View Post
AFAIK, DeathMsg is the one which will not be called on grenade kill.
That makes no sense..The DeathMsg is shown in my screen shot.
__________________
Bugsy is offline
klippy
AlliedModders Donor
Previously known as:
KliPPy
Join Date: May 2013
Location: Serbia
Old 01-06-2017 , 08:15   Re: Ham_Killed skipping frags?
Reply With Quote #13

I'm sure you are talking about this post: https://forums.alliedmods.net/showpo...26&postcount=5
He said "bomb", not "grenade". "Bomb" as in C4.
klippy is offline
Old 01-06-2017, 08:17
HamletEagle
This message has been deleted by HamletEagle. Reason: Bugsy was faster.
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-06-2017 , 08:52   Re: Ham_Killed skipping frags?
Reply With Quote #14

Quote:
Originally Posted by KliPPy View Post
I'm sure you are talking about this post: https://forums.alliedmods.net/showpo...26&postcount=5
He said "bomb", not "grenade". "Bomb" as in C4.
Oh a mis-understanding haha.
__________________
edon1337 is offline
Send a message via Skype™ to edon1337
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 01-06-2017 , 09:53   Re: Ham_Killed skipping frags?
Reply With Quote #15

Quote:
Originally Posted by KliPPy View Post
I'm sure you are talking about this post: https://forums.alliedmods.net/showpo...26&postcount=5
He said "bomb", not "grenade". "Bomb" as in C4.
Ahhh, I got it wrong there. My bad.
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 01-07-2017 , 10:33   Re: Ham_Killed skipping frags?
Reply With Quote #16

Well I've already went ahead and changed to deathmsg
Can't see any other reason for it not working other than what I wrote in the 2nd post

I'll wait for user reports and if it's still broken do some proper debugging. I was hoping someone with in-depth knowledge about the modules as well as the order in which things happen might spot something obvious.
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-07-2017 , 15:42   Re: Ham_Killed skipping frags?
Reply With Quote #17

Why don't you test your timing idea on your own to rule that out?

I'm sure there is a way to work around this. If you want more help, post the plugin and provide a way to produce the issue and what you are expecting to happen.
__________________
Bugsy is offline
[email protected]
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 01-07-2017 , 16:30   Re: Ham_Killed skipping frags?
Reply With Quote #18

Quote:
Originally Posted by aron9forever View Post
Well I've already went ahead and changed to deathmsg
Can't see any other reason for it not working other than what I wrote in the 2nd post
Don't forget about this:
Quote:
Originally Posted by [email protected] View Post
DeathMsg isn't sent when player is killed by bomb.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 01-07-2017 , 17:56   Re: Ham_Killed skipping frags?
Reply With Quote #19

Quote:
Originally Posted by [email protected] View Post
Don't forget about this:
thanks, but I only need to account for instances of players killing other players so its fine

Quote:
Originally Posted by Bugsy View Post
Why don't you test your timing idea on your own to rule that out?

I'm sure there is a way to work around this. If you want more help, post the plugin and provide a way to produce the issue and what you are expecting to happen.
That's the problem though, I'm not actively using the plugin, it's just people reporting stuff to me and sending random screenshots saying "its not working" without giving any other details.

I kept thinking it's hard to test with no players or bots installed but I realize now I could've just added some prints to check this.

It seems to be working fine now with deathmsg so I might have been right.

Quote:
Originally Posted by EFFx View Post
PHP Code:
if((cs_get_user_team(attacker)==CS_TEAM_CT && cs_get_user_team(victim)==CS_TEAM_T) || (cs_get_user_team(attacker)==CS_TEAM_T && cs_get_user_team(victim)==CS_TEAM_CT)) 
LOL, you just need this:

PHP Code:
if(cs_get_user_team(attacker) != cs_get_user_team(victim)) 
I've done most of my scripting work on "fun" modes so what you're seeing there is me making sure spectators killing people, or people killing spectators doesn't count. I know it's irrelevant since they don't even have a revive command but it's micro optimization against avoiding unexpected behavior, I'll leave it as is.

Quote:
Originally Posted by EFFx View Post
Here

PHP Code:
if(cs_get_user_team(player)==CS_TEAM_T || cs_get_user_team(player)==CS_TEAM_CT
Just add the flag 'e' on get_players()

Like this

PHP Code:
get_players(iPlayers,iNum,"e"
Here's the API - https://www.amxmodx.org/api/amxmodx/get_players
I was actually contemplating using the 'e' flag when writing the plugin, however I decided not to for the following reasons:
-I have not found any examples or mentions of using the flag for both teams. All I can find is people using it to either select terrorists, or counter-terrorists, never both. You're supposed to pass another parameter if using the 'e' flag, the one that specifies what team to match against.
-The 'e' flag has had many problems in the past, I'm pretty sure they're all fixed in 1.8.3, but I'm compiling under 1.8.1. I'd rather avoid another micro-optimization than do the research on whether it works or not.


However since you've brought these parts of the code up and had me thinking of optimization I went ahead and cached the player's team.
PHP Code:
iTeam cs_get_user_team(player);
if(
iTeam==CS_TEAM_T || iTeam==CS_TEAM_CT)
{


new 
CsTeams:iTeamAttacker cs_get_user_team(attacker);
new 
CsTeams:iTeamVictim cs_get_user_team(victim);
if((
iTeamAttacker==CS_TEAM_CT && iTeamVictim==CS_TEAM_T) || (iTeamAttacker==CS_TEAM_T && iTeamVictim==CS_TEAM_CT))

__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 01-07-2017 at 17:59.
aron9forever is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-07-2017 , 19:52   Re: Ham_Killed skipping frags?
Reply With Quote #20

I understand your side,

About your 'optimization', for check if the killer/victim is not on spectator, you can use a macro instead of repeating the same if() check.

PHP Code:
#define isOnAvaliableTeam(%1,%2) (cs_get_user_team(%1) != CS_TEAM_SPECTATOR && cs_get_user_team(%2) != CS_TEAM_SPECTATOR) 
__________________
EFFx is offline
Send a message via Skype™ to EFFx
Reply


Thread Tools
Display Modes

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 20:00.


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