Raised This Month: $51 Target: $400
 12% 

[L4D] Checking if any clients are tank


Post New Thread Reply   
 
Thread Tools Display Modes
Dragonshadow
BANNED
Join Date: Jun 2008
Old 09-14-2009 , 17:38   Re: [L4D] Checking if any clients are tank
Reply With Quote #21

Quote:
Originally Posted by Flynn View Post
It strikes me DragonShadow is having an 'I-can't-use-that-suggestion-because-it-has-a-trival-little-fault' complex.

I have those too. Although if you were only ever going to use yer own idea, why even bother posting on this forum?
I am confused and amused by this comment.
I said I couldn't use it because I didn't have time to test it. When I have time to test it or it has been confirmed then I will.
Dragonshadow is offline
Frus
Senior Member
Join Date: Aug 2009
Old 09-14-2009 , 18:43   Re: [L4D] Checking if any clients are tank
Reply With Quote #22

I did confirm it, I've used it multiple times. Like I said though make sure you are checking IsPlayerAlive(i), because it doesn't change until they spawn again.
Frus is offline
Damizean
SourceMod Donor
Join Date: Mar 2009
Old 09-14-2009 , 19:25   Re: [L4D] Checking if any clients are tank
Reply With Quote #23

Quote:
Originally Posted by Frus View Post
It is 5, I've been using it in my plugins for a little while now.

iirc 1-3 are the 3 SI, 4 might be the witch, 0 might be common, but 4 and 0 are just guesses.
Hmmm, I didn't see the m_zombieClass in the Witch datamaps/netprops
__________________
Dat annoying guy
Damizean is offline
Send a message via AIM to Damizean Send a message via MSN to Damizean
Frus
Senior Member
Join Date: Aug 2009
Old 09-14-2009 , 19:39   Re: [L4D] Checking if any clients are tank
Reply With Quote #24

Quote:
Originally Posted by Damizean View Post
Hmmm, I didn't see the m_zombieClass in the Witch datamaps/netprops
Like I said, I just assumed that's what they would have been. For the purposes of my plugin I only needed to know if they were a tank, so i didn't look too much into m_zombieClass.
Frus is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 09-14-2009 , 20:17   Re: [L4D] Checking if any clients are tank
Reply With Quote #25

lol... for some reason this:

PHP Code:
if (GetEntProp(iProp_Send"m_zombieClass") == 5
{
    
//stuff

or this:

PHP Code:
if ((GetEntProp(iProp_Send"m_zombieClass") == 5)
{
    
//stuff

Give me invalid expression errors, but this works just fine (compiling, haven't tested yet):
PHP Code:
new zombieclass GetEntProp(iProp_Send"m_zombieClass");
if (
zombieclass == 5)
{
    
//stuff

Dragonshadow is offline
Frus
Senior Member
Join Date: Aug 2009
Old 09-14-2009 , 20:27   Re: [L4D] Checking if any clients are tank
Reply With Quote #26

PHP Code:
if (GetEntProp(iProp_Send"m_zombieClass") == 5)
{
    
//stuff

Frus is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 09-14-2009 , 20:31   Re: [L4D] Checking if any clients are tank
Reply With Quote #27

Quote:
Originally Posted by Frus View Post
PHP Code:
if (GetEntProp(iProp_Send"m_zombieClass") == 5)
{
    
//stuff

I said that gives an invalid expression error.

Edit: And now it doesn't... wtf... I compared them and they're identical?

Edit2: Oh god damnit its the curse of the single extra parenthesis

Last edited by Dragonshadow; 09-14-2009 at 20:41.
Dragonshadow is offline
Frus
Senior Member
Join Date: Aug 2009
Old 09-14-2009 , 20:42   Re: [L4D] Checking if any clients are tank
Reply With Quote #28

It's not the same as your code. Your first quote has no closing bracket for the if statement, and your second quote has 2 opening brackets for the if statement, and only 1 closing bracket.
Frus is offline
Flynn
Senior Member
Join Date: Sep 2009
Old 09-14-2009 , 20:48   Re: [L4D] Checking if any clients are tank
Reply With Quote #29

Quote:
Originally Posted by Dragonshadow View Post
Edit2: Oh god damnit its the curse of the single extra parenthesis
We all get those days.

Replacing == for = and = for == can be a head thumper.
Quote:
Originally Posted by Dragonshadow View Post
I am confused and amused by this comment.
You've thus far shot down everyone's suggestion for solutions to the problem. These are coders, they know what they're doing (I hope ), you probably don't need to test their stuff.
Flynn is offline
Send a message via MSN to Flynn Send a message via Skype™ to Flynn
Dragonshadow
BANNED
Join Date: Jun 2008
Old 09-14-2009 , 20:53   Re: [L4D] Checking if any clients are tank
Reply With Quote #30

Quote:
Originally Posted by Flynn View Post
You've thus far shot down everyone's suggestion for solutions to the problem. These are coders, they know what they're doing (I hope ), you probably don't need to test their stuff.
I have to test everyone's stuff as I trust no ones judgment nor skill... yea character flaw I know.
Dragonshadow 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:28.


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