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
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 08-12-2011 , 23:25   Re: How to chek if player is connected and is in CT or T team?
Reply With Quote #1

I try to check if 2 players is connected, and player A is in TR or CT team, and player B is in TR or CT team.

PHP Code:
public CheckCaptainJoin(NextCaptainMenu)
{
    if((
is_user_connected(RandomPlayer1) && (cs_get_user_team(RandomPlayer1) == CS_TEAM_T || cs_get_user_team(RandomPlayer1) == CS_TEAM_CT)) && (is_user_connected(RandomPlayer2) && (cs_get_user_team(RandomPlayer2) == CS_TEAM_T || cs_get_user_team(RandomPlayer2) == CS_TEAM_CT)))
    {
        
set_task(2.0,"captain_menu",NextCaptainMenu)
    }
    else
    {
        
set_task(5.0,"CheckCaptainJoin",NextCaptainMenu)
    }

__________________
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
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-12-2011 , 23:29   Re: How to chek if player is connected and is in CT or T team?
Reply With Quote #2

Opposite teams?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 03:24.


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