Raised This Month: $ Target: $400
 0% 

Help Block passing team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Toallin
Junior Member
Join Date: Jun 2014
Old 06-27-2014 , 14:26   Help Block passing team
Reply With Quote #1

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
Toallin is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-28-2014 , 10:14   Re: Help Block passing team
Reply With Quote #2

Quote:
Originally Posted by Toallin View Post
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.

Last edited by HamletEagle; 06-28-2014 at 10:14.
HamletEagle is offline
Toallin
Junior Member
Join Date: Jun 2014
Old 06-28-2014 , 18:56   Re: Help Block passing team
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
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 is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 06-28-2014 , 10:30   Re: Help Block passing team
Reply With Quote #4

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 );

    }


__________________

Last edited by Eagle07; 06-28-2014 at 10:30.
Eagle07 is offline
Toallin
Junior Member
Join Date: Jun 2014
Old 06-28-2014 , 18:59   Re: Help Block passing team
Reply With Quote #5

Quote:
Originally Posted by Eagle07 View Post
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.

Last edited by Toallin; 06-28-2014 at 19:00.
Toallin is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 06-28-2014 , 19:01   Re: Help Block passing team
Reply With Quote #6

Toallin, English Only Please !!
__________________
Eagle07 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 21:06.


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