AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Best way to catch/block team change? (https://forums.alliedmods.net/showthread.php?t=220941)

Blizzard_87 07-16-2013 06:37

[SOLVED] Best way to catch/block team change?
 
there are hooking jointeam & chooseteam client commands.
and there is the TeamInfo Event.

would it be overkill by hooking both client commands and teaminfo event. or is one or the other better more efficient ?

ConnorMcLeod 07-16-2013 08:28

Re: Best way to catch/block team change?
 
If you hook commands, you only hook attempts to change.

You can hook TeamInfo and check against previous Team.

If you want to prevent some changes, then you need to hook commands, so you have to hook jointeam and menuselect, to handle both VGUI and Old Menu.

Blizzard_87 07-16-2013 08:38

Re: Best way to catch/block team change?
 
Quote:

Originally Posted by ConnorMcLeod (Post 1992024)
If you hook commands, you only hook attempts to change.

You can hook TeamInfo and check against previous Team.

If you want to prevent some changes, then you need to hook commands, so you have to hook jointeam and menuselect, to handle both VGUI and Old Menu.

ok thanks heaps :P


All times are GMT -4. The time now is 06:31.

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