Raised This Month: $ Target: $400
 0% 

Locking Teams


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 05-30-2010 , 23:59   Locking Teams
Reply With Quote #1

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.
RedRobster is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-31-2010 , 00:10   Re: Locking Teams
Reply With Quote #2

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 )     } }
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ 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 05:16.


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