AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help Block passing team (https://forums.alliedmods.net/showthread.php?t=242972)

Toallin 06-27-2014 14:26

Help Block passing team
 
Someone could help me running my function block passage to team CT

For example, when x variable has a value to 10.
CT may only be 2

HamletEagle 06-28-2014 10:14

Re: Help Block passing team
 
Quote:

Originally Posted by Toallin (Post 2158305)
Someone could help me running my function block passage to team CT

For example, when x variable has a value to 10.
CT may only be 2

Show us what you tried.

Eagle07 06-28-2014 10:30

Re: Help Block passing team
 
Allow 1 player to join CT

PHP Code:

#include <amxmodx>
#include <amxmisc> 
#include <cstrike> 

public plugin_init( )
{
    
register_clcmd"chooseteam" "Team" );
}

get_players2()

    static 
Players_ActivosCsTeams:Team
    Players_Activos 

    
new Maxplayers get_maxplayers()
    for(new 
1<= Maxplayersi++) 
    { 
        if(!
is_user_connected(i)) continue  
        
        
Team cs_get_user_team(i
        
        if(
Team == CS_TEAM_CT
        { 
            
Players_Activos++ 
        } 
        
    } 
    return 
Players_Activos 

}

public 
Teamid )
{

    if( 
get_players2() >= && !is_user_admin(id) )

    {
        
joinctid )
    }

}

public 
joinctid )
{

    if( 
get_players2() >= && !is_user_admin(id) )
    {

    return ( 
CS_TEAM_T <= cs_get_user_teamid ) <= CS_TEAM_CT );

    }




Toallin 06-28-2014 18:56

Re: Help Block passing team
 
Quote:

Originally Posted by HamletEagle (Post 2158719)
Show us what you tried.

took this

PHP Code:

GetAlive()
{
    new 
iAlive
    
    
for(new i<= g_maxplayersi++)
        if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
            
iVivos++
            
    return 
Alive;



Toallin 06-28-2014 18:59

Re: Help Block passing team
 
Quote:

Originally Posted by Eagle07 (Post 2158724)
Allow 1 player to join CT

PHP Code:

#include <amxmodx>
#include <amxmisc> 
#include <cstrike> 

public plugin_init( )
{
    
register_clcmd"chooseteam" "Team" );
}

get_players2()

    static 
Players_ActivosCsTeams:Team
    Players_Activos 

    
new Maxplayers get_maxplayers()
    for(new 
1<= Maxplayersi++) 
    { 
        if(!
is_user_connected(i)) continue  
        
        
Team cs_get_user_team(i
        
        if(
Team == CS_TEAM_CT
        { 
            
Players_Activos++ 
        } 
        
    } 
    return 
Players_Activos 

}

public 
Teamid )
{

    if( 
get_players2() >= && !is_user_admin(id) )

    {
        
joinctid )
    }

}

public 
joinctid )
{

    if( 
get_players2() >= && !is_user_admin(id) )
    {

    return ( 
CS_TEAM_T <= cs_get_user_teamid ) <= CS_TEAM_CT );

    }




Thanks eagle.
It could not be a procedure as when x does not leave you computer.
Like when one team is full and forsosamente has to be the team that is not.

Eagle07 06-28-2014 19:01

Re: Help Block passing team
 
Toallin, English Only Please !!


All times are GMT -4. The time now is 21:06.

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