Raised This Month: $51 Target: $400
 12% 

error to blocking team menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
andre neves
Junior Member
Join Date: Mar 2011
Old 08-08-2011 , 08:53   error to blocking team menu
Reply With Quote #1

I'm trying to block the team menu with the following code:

HTML Code:
public plugin_init()
{
	...
	register_message(get_user_msgid("ShowMenu"), "event_TeamMenu")
	register_message(get_user_msgid("VGUIMenu"), "event_TeamMenu_VGUI")
}
...

public event_TeamMenu_VGUI(iMsgid, iDest, id)
{
	if(get_pcvar_num(g_cvar_teams_blocks)!=1)
		return PLUGIN_CONTINUE
	
	new iMenu_id=get_msg_arg_int(1)
	
	if(iMenu_id!=2)
		return PLUGIN_CONTINUE
	
	client_cmd(id, "jointeam 6")
	return PLUGIN_HANDLED
}

public event_TeamMenu(iMsgid, iDest, id)
{
	if(get_pcvar_num(g_cvar_teams_blocks)!=1)
		return PLUGIN_CONTINUE
		
	static iText_Menu[50]
	get_msg_arg_string(4,  iText_Menu, charsmax(iText_Menu))
	
	if(!equal(iText_Menu, "#Team_Select") && !equal(iText_Menu, "#Team_Select_Spect"))
		return PLUGIN_CONTINUE
		
	client_cmd(id, "jointeam 6")
	return PLUGIN_HANDLED
}
I want to send the player to the SPECT if cvar is active, but then when the player will play, the player's hud is in error, there is another way to send the player to SPECT without the error?
andre neves is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-08-2011 , 10:00   Re: error to blocking team menu
Reply With Quote #2

Look at my Team Join Management plugin on how to force players on a specific team.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-08-2011 , 10:39   Re: error to blocking team menu
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
Look at my Team Join Management plugin on how to force players on a specific team.
is human_join_team no avaiable in CS??

or is he trying to force specific players and limit the teams like you do.
Doc-Holiday is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-08-2011 , 10:56   Re: error to blocking team menu
Reply With Quote #4

Quote:
Originally Posted by Doc-Holiday View Post
is human_join_team no avaiable in CS??

or is he trying to force specific players and limit the teams like you do.
If you use humans_join_team, then players cannot go to a team later on.
I'm not even sure you could change player's team after they are forced using humans_join_team.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-08-2011 , 11:04   Re: error to blocking team menu
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
If you use humans_join_team, then players cannot go to a team later on.
I'm not even sure you could change player's team after they are forced using humans_join_team.
you can ive done it on cz
Doc-Holiday 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 04:07.


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