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

block switch team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benmassey
Member
Join Date: Dec 2018
Old 12-30-2018 , 08:16   block switch team
Reply With Quote #1

hey guys i needa plugin that blocks switch theams
i mean , whhen player join to my server if he join ct he cant move t
and if he disconnected from the server and connect again he will be ct again

any help???
benmassey is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-30-2018 , 10:33   Re: block switch team
Reply With Quote #2

And this if or CSGO or CSS ?
__________________
Do not Private Message @me
Bacardi is offline
benmassey
Member
Join Date: Dec 2018
Old 12-30-2018 , 11:10   Re: block switch team
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
And this if or CSGO or CSS ?
oh im sorry csgo
benmassey is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 12-30-2018 , 18:49   Re: block switch team
Reply With Quote #4

AddCommandListener "jointeam" and cookies (for team index)
__________________
LenHard is offline
benmassey
Member
Join Date: Dec 2018
Old 12-31-2018 , 02:30   Re: block switch team
Reply With Quote #5

Quote:
Originally Posted by LenHard View Post
AddCommandListener "jointeam" and cookies (for team index)
where do i do it
benmassey is offline
potatoz
AlliedModders Donor
Join Date: Nov 2016
Old 01-01-2019 , 15:06   Re: block switch team
Reply With Quote #6

untested but should do the trick, if the client is in either CT or T he will be blocked from picking another team. you could develop it further by adding the command arguments, where arg #1 is the target team, should you for instance still want to allow moving to spectators

PHP Code:
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1

#define VERSION "1.0b"

public Plugin:myinfo =
{
    
name "block teamchange",
    
author "potatoz",
    
description "",
    
version VERSION,
    
url ""
};

public 
OnPluginStart()
{
    
AddCommandListener(Command_JoinTeam"jointeam");
}

public 
Action Command_JoinTeam(int clientchar[] commandint args)
{
    if(!
client || !IsClientInGame(client))
        return 
Plugin_Continue;

    if(
GetClientTeam(client) > 1)
        return 
Plugin_Handled;

    return 
Plugin_Continue;

__________________

Last edited by potatoz; 01-01-2019 at 15:07.
potatoz is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-02-2019 , 11:11   Re: block switch team
Reply With Quote #7

I leave here my version, I have only tested in CSGO.

I was looking and testing wierd bugs or behavier when autoteambalance kick in and when player connect to server plaa plaa plaa.


This plugin is disabled by default:
sm_stop_jointeam 0

To enable type sm_cvar sm_stop_jointeam 1
- Then this plugin stay enabled until server shutdown or someone change it back 0
- To enable this plugin automatically when server launch, add cvar in server cfg file

This plugin store players by SteamID, temporary, until map end.
- After map change, player can freely join any team by himself, once (CT or T).
- When player have enter in team, he can't use jointeam command or jointeam command is used to back old team.
- When client reconnect back in same map, plugin force player back to old team just once, to avoid any conflicts later.
- When this have happen, plugin keep updating player team index on this forward, until he reconnect again.


NOTE: There is not any admin bypass. This affect to all human players.

block team change

Last edited by Bacardi; 01-02-2019 at 11:13.
Bacardi is offline
djded
Member
Join Date: Jul 2019
Location: Czech Republic
Old 03-20-2021 , 05:33   Re: block switch team
Reply With Quote #8

Quote:
Originally Posted by Bacardi View Post
I leave here my version, I have only tested in CSGO.

I was looking and testing wierd bugs or behavier when autoteambalance kick in and when player connect to server plaa plaa plaa.


This plugin is disabled by default:
sm_stop_jointeam 0

To enable type sm_cvar sm_stop_jointeam 1
- Then this plugin stay enabled until server shutdown or someone change it back 0
- To enable this plugin automatically when server launch, add cvar in server cfg file

This plugin store players by SteamID, temporary, until map end.
- After map change, player can freely join any team by himself, once (CT or T).
- When player have enter in team, he can't use jointeam command or jointeam command is used to back old team.
- When client reconnect back in same map, plugin force player back to old team just once, to avoid any conflicts later.
- When this have happen, plugin keep updating player team index on this forward, until he reconnect again.


NOTE: There is not any admin bypass. This affect to all human players.

block team change
Nice plugin, but, if some auto team balancer plugin, trying to move player from team A to team B, player stay in team A, because he can't moved to another team
Also admins can't switch players from admin panel.
Some solution to fix tahat?
Thanks
Game Cs:s v91
Sm 1.9
djded is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-20-2021 , 05:49   Re: block switch team
Reply With Quote #9

Quote:
Originally Posted by djded View Post
Game Cs:s v91
Sm 1.9
Are there other versions of cs:s ?
Bacardi is offline
djded
Member
Join Date: Jul 2019
Location: Czech Republic
Old 03-20-2021 , 05:59   Re: block switch team
Reply With Quote #10

Quote:
Originally Posted by Bacardi View Post
Are there other versions of cs:s ?
No, I have latest Counter-Strike Source server. And tested on it only. Will be perfect, if admins can have imunity from blocking swith(configured in some cars) and blocking team change expire In about 10-15 min for all players. If it possible. And need autoteambalance can move players to.
Sorry for my English.

Last edited by djded; 03-20-2021 at 06:03.
djded 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 20:15.


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