Raised This Month: $ Target: $400
 0% 

cant go to ct team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PsychoPach
Member
Join Date: Aug 2010
Location: Lithuania
Old 08-02-2011 , 14:08   cant go to ct team
Reply With Quote #1

how make, then you choose team (CT or T) you can't go to ct, you can go only to T, but with password (/password) you automaticly moved to ct?

sorry for me bad english
__________________
Sorry for me english
PsychoPach is offline
Send a message via Skype™ to PsychoPach
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 08-02-2011 , 15:03   Re: cant go to ct team
Reply With Quote #2

This sounds like it should be in Suggestions/Requests.
__________________
Hi.
Kreation is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-02-2011 , 15:06   Re: cant go to ct team
Reply With Quote #3

PHP Code:
public Message_ShowMenuiMsgIdiMsgDestid 

    new 
szText[20// #IG_VIP_Team_Select 
    // #Terrorist_Select 
    // #CT_Select 
    
get_msg_arg_string(4szTextcharsmax(szText)) 

    if( 
contain(szText"Team_Select") != -
    { 
        new 
iKeys get_msg_arg_int(1
        new 
bool:bKeyChanged 
        
new szText[512], 
        
new szName[64
        
formatex(szTextcharsmax(szText), "\ySelect a team\w^n^n"

        if( 
get_pcvar_string(g_pCvarTerroNameszNamecharsmax(szName)) ) 
        { 
            
+= formatex(szText[n], charsmax(szText)-n"1. %s^n"szName
        } 
        else 
        { 
            
+= formatex(szText[n], charsmax(szText)-n"\d1. Not Available\w^n"
            
iKeys &= ~MENU_KEY_1 
            bKeyChanged 
true 
        


        if( 
get_pcvar_string(g_pCvarCtNameszNamecharsmax(szName)) ) 
        { 
            
+= formatex(szText[n], charsmax(szText)-n"2. %s^n"szName
        } 
        else 
        { 
            
+= formatex(szText[n], charsmax(szText)-n"\d2. Not Available\w^n"
            
iKeys &= ~MENU_KEY_2 
            bKeyChanged 
true 
        

====================================
      
somewhere here
       
        
if( iKeys MENU_KEY_1 
        { 
               
bKeyChanged true 
   MAKE 
NEW BOOLEAN HERE LIKE g_allowJoin[id] = true
            

        } 

        if( 
iKeys MENU_KEY_2 
        { 
            
set Boolean to false
 
and make additional check for password

__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-02-2011 , 15:07   Re: cant go to ct team
Reply With Quote #4

Just take any KZ JUMP plugin . in most jump plugins you can go only T. and will be easy d to modify access with the password or admin flags
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
PsychoPach
Member
Join Date: Aug 2010
Location: Lithuania
Old 08-02-2011 , 16:11   Re: cant go to ct team
Reply With Quote #5

Thanks avril-lavigne i will try it
__________________
Sorry for me english
PsychoPach is offline
Send a message via Skype™ to PsychoPach
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-03-2011 , 01:21   Re: cant go to ct team
Reply With Quote #6

A bit more of a simple approach:

PHP Code:
#include <amxmodx>

new g_pPassword;
new 
bool:g_bLoggedIn33 ];

public 
plugin_init() 
{
    
g_pPassword register_cvar"ct_password""your_password_here" );
    
    
register_concmd"login""cmdPassword"_"password <password here>" );
    
    
register_clcmd"chooseteam""cmdTeam");
    
register_clcmd"jointeam""cmdTeam");
}

public 
client_connectid )
{
    
g_bLoggedInid ] = false;
}

public 
cmdTeamid )
{
    new 
szTeam];
    
read_argv1szTeam);
    
    if( 
str_to_numszTeam ) == && !g_bLoggedInid ] )
    {
        
client_printidprint_center"CT is unavailable without the password" );
        
client_cmdid"chooseteam" );
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}
    
public 
cmdPasswordid )
{      
    new 
szArg32 ], szPass32 ];
    
read_argv1szArgcharsmaxszArg ) );
    
get_pcvar_stringg_pPasswordszPasscharsmaxszPass ) );
    
    if( 
equalszArgszPass ) )
    {
        
g_bLoggedInid ] = true;
        
console_printid"Successfully logged in!" );
    }
    else 
console_printid"Login Failed! Incorrect password!" );

__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
PsychoPach
Member
Join Date: Aug 2010
Location: Lithuania
Old 08-03-2011 , 13:22   Re: cant go to ct team
Reply With Quote #7

thanks hornet
__________________
Sorry for me english
PsychoPach is offline
Send a message via Skype™ to PsychoPach
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:22.


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