Raised This Month: $ Target: $400
 0% 

How to chek if player is connected and is in CT or T team?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sader
Junior Member
Join Date: Aug 2011
Old 08-12-2011 , 23:34   Re: How to chek if player is connected and is in CT or T team?
Reply With Quote #1

But you must strore players ID somewhere,somehow.
You can loop through players and do some checks

PHP Code:
for(new i=1i<=32i++)
{
  if(
is_user_alive(i))
  {
  }


Maybe you need somthing like this? How you know if player is Captain?
PHP Code:
new CT_captain_foundT_captain_found;
for(new 
i=1i<=32i++)
{
  if(
is_user_alive(i))
  {
    if(
CT_captain_found == && cs_get_user_team(i) == CS_TEAM_CT && is captain)
    {
      
//somethings goes here
      
CT_captain_found 1
    }
    
    if(
T_captain_found == && cs_get_user_team(i) == CS_TEAM_T && is captain)
    {
      
//somethings goes here
      
T_captain_found 1
    }
  }


Last edited by sader; 08-12-2011 at 23:41.
sader is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 08-13-2011 , 00:03   Re: How to chek if player is connected and is in CT or T team?
Reply With Quote #2

Solved/
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 03:24.


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