AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Locking Teams (https://forums.alliedmods.net/showthread.php?t=128322)

RedRobster 05-30-2010 23:59

Locking Teams
 
I want to be able to stop people from switching teams once a cvar is changed. I really do not care if the menu pops up, I just don't want them to be able to change.

I saw Exolents team management plugin. http://forums.alliedmods.net/showthr...ht=team+switch

I was hoping I could manage it within my own plugin however. I tried using the code from his plugin to do this, but I couldn't get it to work.

wrecked_ 05-31-2010 00:10

Re: Locking Teams
 
Code:
new const ExolentPluginName[] = "plugin_name.amxx" new VarLockTeams public plugin_init() {     VarLockTeams = register_cvar( "lock_teams", "1" )         set_task( 3.0, "TaskCheckCvar", _, _, _, "b" ) } public TaskCheckCvar() {     if( get_pcvar_num( VarLockTeams ) )     {         unpause( "ac", ExolentPluginName )     }         else     {         pause( "ac", ExolentPluginName )     } }


All times are GMT -4. The time now is 05:16.

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