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

How to return dead ct players?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 05-05-2012 , 10:21   How to return dead ct players?
Reply With Quote #1

This stock posibble?

PHP Code:
stock bool:is_dead_ct(id)
{
    new 
CsTeams:team cs_get_user_team(id);
    if(!
is_user_alive(id) && team == CS_TEAM_CT) return true;
    
    return 
false;

__________________
kiki33hun is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-05-2012 , 11:06   Re: How to return dead ct players?
Reply With Quote #2

This seems to work, why don't you test it?
__________________
<VeCo> is offline
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 05-05-2012 , 11:13   Re: How to return dead ct players?
Reply With Quote #3

Idont test, iam online mobile phone
__________________
kiki33hun is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-05-2012 , 11:15   Re: How to return dead ct players?
Reply With Quote #4

PHP Code:
GetDeadCTCount( ) {
  static 
iPlayers32 ], iNum;
  
/* b = Alive players are skipped, e = Match with the followed team */
  
get_playersiPlayersiNum"be""CT" );

  return 
iNum;

Is not working in Zombie Plague though.

For Zombie Plague:

PHP Code:
#include < fakemeta >

#define OFFSET_CSTEAMS 114
#define TEAM_CT 2
#define TEAM_T 1

GetAliveHumansCount( ) {
  static 
imaxClientsiCount; if( !maxClients maxClients get_maxplayers( ); iCount 0;

  for( 
1maxClients 1i++ )
    if( 
is_user_connected) && !is_user_alive) && get_pdata_intiOFFSET_CSTEAMS ) == TEAM_CT )
      
iCount++;

  return 
iCount;

__________________

Last edited by claudiuhks; 05-05-2012 at 11:19.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 05-05-2012 , 11:19   Re: How to return dead ct players?
Reply With Quote #5

Count????? No count, read frist post please
__________________
kiki33hun is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-05-2012 , 11:21   Re: How to return dead ct players?
Reply With Quote #6

Quote:
Originally Posted by kiki33hun View Post
Count????? No count, read frist post please
Your title sais: How to return dead ct players?

So? What should I understand?

MeRcyLeZZ said:

PHP Code:
// Get Alive CTs
fnGetAliveCTs()
{
    static 
iCTsid
    iCTs 
0
    
    
for (id 1id <= g_maxplayersid++)
    {
        if (
g_isalive[id])
        {            
            if (
fm_cs_get_user_team(id) == FM_CS_TEAM_CT)
                
iCTs++
        }
    }
    
    return 
iCTs;

Then, Get Alive Counter-Terrorists will return the count of them. Sorry for that
__________________

Last edited by claudiuhks; 05-05-2012 at 11:26.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 05-05-2012 , 11:27   Re: How to return dead ct players?
Reply With Quote #7

lol sorry wrong topic name! Players -> player
__________________
kiki33hun is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-05-2012 , 11:34   Re: How to return dead ct players?
Reply With Quote #8

So your function should work..
__________________
<VeCo> is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-05-2012 , 16:50   Re: How to return dead ct players?
Reply With Quote #9

Quote:
Originally Posted by claudiuhks View Post
Your title sais: How to return dead ct players?

So? What should I understand?
claudiuhks is grumpy today.

@OP....your functoin should work. I see nothing wrong with it.
Not sure about stock. But the logic is correct.
Liverwiz is offline
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 05-06-2012 , 01:53   Re: How to return dead ct players?
Reply With Quote #10

Okey, thanx information.
__________________
kiki33hun 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 19:24.


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