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

[es]Como detecto si hay un user de tt o ct?


  
 
 
Thread Tools Display Modes
Author Message
SylvertCs
BANNED
Join Date: Sep 2009
Location: San Nicolas-Buenos Aires
Old 01-07-2010 , 20:51   [es]Como detecto si hay un user de tt o ct?
#1

Hola como ago para q verifique si hay algun user de tt o ct?¿?¿
SylvertCs is offline
Send a message via MSN to SylvertCs
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-07-2010 , 20:56   Re: [es]Como detecto si hay un user de tt o ct?
#2

get_user_team(id) ????
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
SylvertCs
BANNED
Join Date: Sep 2009
Location: San Nicolas-Buenos Aires
Old 01-07-2010 , 21:05   Re: [es]Como detecto si hay un user de tt o ct?
#3

algo asi?
PHP Code:
public lala(id)
{
    new 
team
    team 
cs_get_user_team(id) == CS_TEAM_CT
    
if(team <= 1)
    {
        
server_cmd("sv_restart 1")
    }

SylvertCs is offline
Send a message via MSN to SylvertCs
vazmar
Veteran Member
Join Date: Apr 2009
Old 01-07-2010 , 21:16   Re: [es]Como detecto si hay un user de tt o ct?
#4

get_user_team(id) == 1 , es tt
"" "" 2 , es ct
y 3 spec

y si pondrias !get_user_team(id)
quiere decir q no eligio team..
en vez d poner cstrike usa asi..
vazmar is offline
ecurbelo
BANNED
Join Date: Dec 2009
Location: Matando Trolls (Haslers)
Old 01-07-2010 , 21:18   Re: [es]Como detecto si hay un user de tt o ct?
#5

Quote:
Originally Posted by vazmar View Post
get_user_team(id) == 1 , es tt
"" "" 2 , es ct
y 3 spec

y si pondrias !get_user_team(id)
quiere decir q no eligio team..
en vez d poner cstrike usa asi..
y team unasigned y spectator? =/
ecurbelo is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-07-2010 , 21:26   Re: [es]Como detecto si hay un user de tt o ct?
#6

Quote:
Originally Posted by ecurbelo View Post
y team unasigned y spectator? =/
PHP Code:
if( get_user_team(id) == CS_TEAM_UNASSIGNED || get_user_team(id) == CS_TEAM_SPECTATOR 
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
SylvertCs
BANNED
Join Date: Sep 2009
Location: San Nicolas-Buenos Aires
Old 01-07-2010 , 21:32   Re: [es]Como detecto si hay un user de tt o ct?
#7

no me entendieron.... vieron el Deathrun que detecta si hay algun tt y si no hay ninguno manda rr bueno quiero hacer algo similar
SylvertCs is offline
Send a message via MSN to SylvertCs
Kiske
Veteran Member
Join Date: May 2009
Old 01-07-2010 , 21:49   Re: [es]Como detecto si hay un user de tt o ct?
#8

PHP Code:
// En el Public donde quieras detectar si hay un TT. Pones:
if( !Terroristas() )
{
    
// Tu Code !!
}

Terroristas()
{
    new 
TTs 0
    
    
for( new id 1id <= get_maxplayers(); id++ )
        if( 
is_user_connected(id) && get_user_team(id) == )
                
TTs++
    
    return 
TTs;

__________________

Kiske is offline
Send a message via Skype™ to Kiske
Hasler33
BANNED
Join Date: Jan 2010
Old 01-07-2010 , 21:51   Re: [es]Como detecto si hay un user de tt o ct?
#9

Quote:
Originally Posted by Kiske View Post
PHP Code:
// En el Public donde quieras detectar si hay un TT. Pones:
if( !Terroristas() )
{
    
// Tu Code !!
}

Terroristas()
{
    new 
TTs 0
    
    
for( new id 1id <= get_maxplayers(); id++ )
        if( 
is_user_connected(id) && get_user_team(id) == )
                
TTs++
    
    return 
TTs;

:O ta bueno (y)
Hasler33 is offline
SylvertCs
BANNED
Join Date: Sep 2009
Location: San Nicolas-Buenos Aires
Old 01-07-2010 , 22:12   Re: [es]Como detecto si hay un user de tt o ct?
#10

listo gracias Kiske
SylvertCs is offline
Send a message via MSN to SylvertCs
 



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 13:37.


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