Raised This Month: $32 Target: $400
 8% 

Retry plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FitnessMan
Junior Member
Join Date: Oct 2014
Old 05-10-2015 , 04:11   Retry plugin
Reply With Quote #1

Im need plugin for basebuilder 6.5 (Tirant) when im retry,auto join in this team where I was before retry.
FitnessMan is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-10-2015 , 06:56   Re: Retry plugin
Reply With Quote #2

This is NOT asking plugins forum, this IS asking questions about scripting forum.
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
FitnessMan
Junior Member
Join Date: Oct 2014
Old 05-10-2015 , 07:03   Re: Retry plugin
Reply With Quote #3

im need help :X sorry
FitnessMan is offline
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 05-15-2015 , 18:43   Re: Retry plugin
Reply With Quote #4

PHP Code:
#include <  amxmodx  >

#define PLUGIN_NAME                    "Retry in same team"
#define PLUGIN_VERSION                    "1.1b"
#define PLUGIN_AUTHOR                    "VEN & Hades Ownage"

#pragma semicolon 1

new g_pcvar ], UserTeam 33 ];

public 
plugin_init (    ) {
    
    
register_plugin PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR );

    
register_message get_user_msgid "ShowMenu" ), "message_show_menu" );
    
register_message get_user_msgid "VGUIMenu" ), "message_vgui_menu" );

    
g_pcvar ] = register_cvar "retry_team_t""1" ); // numarul echipei T ( nu modificati )
    
g_pcvar ] = register_cvar "retry_team_ct""2" ); // numarul echipei CT ( nu modificati )

    
g_pcvar ] = register_cvar "retry_class""5" );
}

public 
message_show_menu msgiddestid ) {
    
    static 
team_select [ ] = "#Team_Select";
    static 
text_code sizeof team_select ];
    
    
get_msg_arg_string 4text_codesizeof text_code );
    
    if ( !
equal text_codeteam_select ) )
        return 
0;

    
set_force_team_join_task idmsgid );

    return 
1;
}

public 
message_vgui_menu msgiddestid ) {
    
    if ( 
get_msg_arg_int ) != )
        return 
0;

    
set_force_team_join_task idmsgid );

    return 
1;
}


public 
task_force_team_join menu_msgid [ ], id ) {
    
    if ( 
get_user_team id ) || !UserTeam id ] )
        return;

    static 
team ], class [ ];
    switch ( 
UserTeam id ] ) {
        
        case 
1get_pcvar_string g_pcvar ], teamsizeof team );
        
        case 
2get_pcvar_string g_pcvar ], teamsizeof team );
        
    }
    
    
get_pcvar_string g_pcvar ], class, sizeof class - );
    
force_team_join idmenu_msgid ], team, class );
}

public 
client_disconnect id ) {
    
    switch ( 
get_user_team id ) ) {
        
        case 
1UserTeam id ] = 1;
        
        case 
2UserTeam id ] = 2;
    }
}

stock force_team_join idmenu_msgidteam [ ] = "5", class [ ] = "0" )  {
    
    static 
jointeam [ ] = "jointeam";
    
    if ( class [ 
] == '0' ) {
        
        
engclient_cmd idjointeamteam );
        return;
    }

    static 
msg_blockjoinclass [ ] = "joinclass";
    
msg_block get_msg_block menu_msgid );
    
    
set_msg_block menu_msgidBLOCK_SET );
    
    
engclient_cmd idjointeamteam );
    
engclient_cmd idjoinclass, class );
    
    
set_msg_block menu_msgidmsg_block );
}

set_force_team_join_task idmenu_msgid ) {
    
    static 
param_menu_msgid ];
    
param_menu_msgid ] = menu_msgid;
    
    
set_task 0.1"task_force_team_join"idparam_menu_msgidsizeof param_menu_msgid );


Last edited by hadesownage; 05-15-2015 at 18:43.
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
FitnessMan
Junior Member
Join Date: Oct 2014
Old 05-22-2015 , 04:18   Re: Retry plugin
Reply With Quote #5

not work :/
FitnessMan is offline
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 05-29-2015 , 21:42   Re: Retry plugin
Reply With Quote #6

Quote:
Originally Posted by FitnessMan View Post
not work :/
if u use autojoin, put my plugin ahead of him.
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
Reply


Thread Tools
Display Modes

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 12:31.


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