Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage, CsTeams tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-31-2014 , 11:32   Re: Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #1

Your problem is right here:
PHP Code:
return (Vteam == Ateam == CS_TEAM_T) ? HAM_SUPERCEDE HAM_IGNORED 
HamletEagle is offline
Old 07-31-2014, 11:33
bat
This message has been deleted by bat. Reason: Double msg
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-31-2014 , 15:06   Re: Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #3

There's no need to create new var on damage forward. Also may lag/overflow..
Just

PHP Code:
public onTakeDamage(victiminflictorattackerFloat:damagedmgbits
{
    return (
get_user_team(victim) == && get_user_team(attacker) == 1) ? HAM_SUPERCEDE HAM_IGNORED 

No need for cstrike inc
__________________
Hey ^_^
NikKOo31 is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-01-2014 , 01:29   Re: Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #4

Quote:
Originally Posted by NikKOo31 View Post
Also may lag/overflow..


Would be better if someone explains "better" what's a lag issue and a overflow problem, since many guys don't know even when they are triggered.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 08-01-2014 , 12:37   Re: Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #5

Quote:
Originally Posted by meTaLiCroSS View Post


Would be better if someone explains "better" what's a lag issue and a overflow problem, since many guys don't know even when they are triggered.
I got servers crashing before I knew statics var -.-
__________________
Hey ^_^
NikKOo31 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-01-2014 , 13:03   Re: Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #6

Quote:
Originally Posted by NikKOo31 View Post
I got servers crashing before I knew statics var -.-
However, variables have absolutely nothing to do with overflowing! Overflowing is caused by too much network traffic, and variables are never sent over internet.
klippy is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 08-01-2014 , 14:14   Re: Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #7

Quote:
Originally Posted by NikKOo31 View Post
I got servers crashing before I knew statics var -.-
That will not happen unless you misuse AMXX in some other way. Warning someone about lagging the server because he is creating two variables in an event forward (which is by no means called frequently compared to something like client_PreThink) is far removed from any reality.

Quote:
Originally Posted by Flick3rR View Post
I've actually heard that the deafult native (*get_user_team()) has some bugs and doesn't always provide the right team (like not detecting changes, etc..). That's why I prefer using the cs_ native.
These should all be fixed in the dev versions of AMXX.
__________________
In Flames we trust!
Nextra is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 08-01-2014 , 11:10   Re: Ham_TakeDamage, CsTeams tag mismatch
Reply With Quote #8

Quote:
Originally Posted by NikKOo31 View Post
There's no need to create new var on damage forward. Also may lag/overflow..
Just

PHP Code:
// snip 
No need for cstrike inc
Creating a set of variables in TakeDamage will never ever do that. Don't spread misguided and misinformed fear like this, if he needs the variables later or wishes to use them for clarity it is perfectly fine.

Also not using cstrike offers no tangible benefit unless he wants to make this plugin mod-independent.
__________________
In Flames we trust!

Last edited by Nextra; 08-01-2014 at 11:12.
Nextra 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 12:56.


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