Prevent class change in TF2
Yes, i don't know how, i typed "class" instead of "team" in the topic title, i'm sleeping i guess. Sorry!
Hi all. I'm trying to make something simple in Sourcemod that simply prevent a client from switching team when it's reached the limit. Code:
public OnPluginStart()cidra has joined team RED Full team. cidra has joined team SPECTATORS This should be normal, but actually my client stays on RED team, not on SPEC. At the beginning i tried to set the client's team to the old one. Now i also tried to simply switch to spectator team but with the same results (Here the reason why oldTeam is never used) What could be the problem? Thanks in advance for you availability. |
Re: Prevent class change in TF2
You can block the player from joining team instead.
Code:
public void OnPluginStart() |
Re: Prevent class change in TF2
Quote:
|
Re: Prevent class change in TF2
Snippet blocks all usage of jointeam no matter args
|
Re: Prevent class change in TF2
Quote:
Just asking: why can't i use HookEvent to prevent team changes while i can do that to prevent class changes? :shock: |
Re: Prevent class change in TF2
Quote:
Using this obtuse information, we could further implement a case-by-case basis on how hard we want to bone people. Soooo, something like this is what I use in one of my plugins. Clearly a modifimidicated version of jointeam. If this doesn't help you at all, then well sorry for wasting your time lol. You'll see something like "teamJoinAuth" in the code. I use GetRandomInt to generate that at plugin start. Ideally a pseudo anti-bypass or something. PHP Code:
|
Re: Prevent class change in TF2
Quote:
|
Re: Prevent class change in TF2
If you're doing this by hooking commands, you're going to need to handle autoteam as well (which is the same as clicking on the Auto door in the team selection screen).
|
| All times are GMT -4. The time now is 21:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.