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:15   Re: How to chek if player is connected and is in CT or T team?
Reply With Quote #1

Ops, i edited my funcion, small fail:

is not get_user_team

is cs_get_user_team

PHP Code:
public CheckClientConnectedTeam(Client,Client2)
{
    if((
is_user_connected(Client) && cs_get_user_team(Client) == CS_TEAM_T) && (is_user_connected(Client2) && cs_get_user_team(Client2) == CS_TEAM_CT))
    {
        
client_print(0,3,"OK, ALL CLIENTS IS NOW CONNECTED");
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
/*DO SOMETHING ELSE*/
        
client_print(0,3,"LOL, WAIT FOR CLIENT CONNECT");
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;

Not errors, but is correct way?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 08-12-2011 at 23:18. Reason: :P
^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:22   Re: How to chek if player is connected and is in CT or T team?
Reply With Quote #2

Yes.
__________________
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