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

block team change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
itaymitay
Member
Join Date: Sep 2009
Old 01-06-2011 , 11:51   block team change
Reply With Quote #1

i tried all the team change block plugins and when some one get in to the radio menu and press "m" and then "2" its change him to ct who can block this thing?
itaymitay is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 01-06-2011 , 12:37   Re: block team change
Reply With Quote #2

search
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
itaymitay
Member
Join Date: Sep 2009
Old 01-06-2011 , 12:50   Re: block team change
Reply With Quote #3

i told i searched but all the plugins dont block the thing that i say...
you can press "m" and "2" in any menu you are and be ct...
itaymitay is offline
MostwantedScript
Senior Member
Join Date: Sep 2010
Location: Sweden,Gothenburg
Old 01-07-2011 , 16:13   Re: block team change
Reply With Quote #4

Quote:
Originally Posted by itaymitay View Post
i told i searched but all the plugins dont block the thing that i say...
you can press "m" and "2" in any menu you are and be ct...
PHP Code:
/* AMX Mod X
*   Auto Join on Connect
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*
*     DESCRIPTION
*       Plugin allow to players automatically join team/team&class on connect.
*
*     CVARS
*       ajc_team (0: OFF, N: team index, 5: auto team, default: 5) - controls team join
*       ajc_class (0: OFF, N: class index, 5: auto class, default: 5) - controls class join
*       ajc_imm (0: OFF, 1: ON, default: 1) - don't affect on immuned players (ON/OFF)
*
*     CREDITS
*       Major__ - inquiry
*/

#include <amxmodx>

#define PLUGIN_NAME "Auto Join on Connect"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"

#define IMMUNITY_ACCESS_LEVEL ADMIN_IMMUNITY

#define AUTO_TEAM_JOIN_DELAY 0.1

#define TEAM_SELECT_VGUI_MENU_ID 2

new g_pcvar_team
new g_pcvar_class
new g_pcvar_imm

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_team register_cvar("ajc_team""5")
    
g_pcvar_class register_cvar("ajc_class""5")
    
g_pcvar_imm register_cvar("ajc_imm""1")
}

public 
message_show_menu(msgiddestid) {
    if (!
should_autojoin(id))
        return 
PLUGIN_CONTINUE

    
static team_select[] = "#Team_Select"
    
static menu_text_code[sizeof team_select]
    
get_msg_arg_string(4menu_text_codesizeof menu_text_code 1)
    if (!
equal(menu_text_codeteam_select))
        return 
PLUGIN_CONTINUE

    set_force_team_join_task
(idmsgid)

    return 
PLUGIN_HANDLED
}

public 
message_vgui_menu(msgiddestid) {
    if (
get_msg_arg_int(1) != TEAM_SELECT_VGUI_MENU_ID || !should_autojoin(id))
        return 
PLUGIN_CONTINUE

    set_force_team_join_task
(idmsgid)

    return 
PLUGIN_HANDLED
}

bool:should_autojoin(id) {
    return (
get_pcvar_num(g_pcvar_team) && !get_user_team(id) && !task_exists(id) && (!get_pcvar_num(g_pcvar_imm) || !(get_user_flags(id) & IMMUNITY_ACCESS_LEVEL)))
}

set_force_team_join_task(idmenu_msgid) {
    static 
param_menu_msgid[2]
    
param_menu_msgid[0] = menu_msgid
    set_task
(AUTO_TEAM_JOIN_DELAY"task_force_team_join"idparam_menu_msgidsizeof param_menu_msgid)
}

public 
task_force_team_join(menu_msgid[], id) {
    if (
get_user_team(id))
        return

    static 
team[2], class[2]
    
get_pcvar_string(g_pcvar_teamteamsizeof team 1)
    
get_pcvar_string(g_pcvar_class, class, sizeof class - 1)
    
force_team_join(idmenu_msgid[0], team, class)
}

stock force_team_join(idmenu_msgid/* const */ team[] = "5"/* const */ class[] = "0") {
    static 
jointeam[] = "jointeam"
    
if (class[0] == '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)

__________________
Owner & Creator of
http://mostwantedhf.info
MostwantedScript is offline
Send a message via Skype™ to MostwantedScript
itaymitay
Member
Join Date: Sep 2009
Old 01-08-2011 , 10:33   Re: block team change
Reply With Quote #5

its dont even block the "m" botton...
i want that there is no way to move team exept that admin move you...
itaymitay is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 03-18-2011 , 16:35   Re: block team change
Reply With Quote #6

It donīt block the console command jointeam 2, does it?
STr!ker is offline
gtpunkt
Veteran Member
Join Date: Dec 2008
Location: Berlin
Old 03-18-2011 , 16:51   Re: block team change
Reply With Quote #7

Team Join Management by Exolent

@STr!ker

tjm_block_change <0|1>
  • If tjm_switch_team isn't 1, this will block the client from choosing teams.
  • 0 = Allow Team Change, 1 = Block Team Change
gtpunkt is offline
Send a message via Skype™ to gtpunkt
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 03-19-2011 , 20:23   Re: block team change
Reply With Quote #8

This is the command only for teamchange. The players can write jointeam 2 in console. I have already Team Join Management, but can you fix it? I have tried this version and this works, now i want a better performance of one plugin. So you can insert it in Team Management?
STr!ker is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 10-24-2011 , 20:29   Re: block team change
Reply With Quote #9

push
STr!ker is offline
renato127
Member
Join Date: Jan 2009
Location: Brazil, Rio de Janeiro
Old 10-25-2011 , 10:52   Re: block team change
Reply With Quote #10

try this one.

PHP Code:
#include <amxmodx> 
#include <amxmisc>  
public plugin_init() {
     
register_plugin("BlockJT""0.1"".vitor")
     
register_clcmd"jointeam""BlockJT")

 public 
BlockJT(id) {
     if( 
is_user_admin(id) )
         return 
PLUGIN_CONTINUE
     
return PLUGIN_HANDLED 


Last edited by renato127; 10-25-2011 at 10:55.
renato127 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 19:24.


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