Talk:Creating a Team-Menu: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(DOESNT WORK)
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
:Well I suppose you can, try checking out the source code for CS:S, I'm not sure if creating a new mod extracts it though --[[User:Baliame|Baliame]] 14:29, 20 Oct 2007 (PDT)
:Well I suppose you can, try checking out the source code for CS:S, I'm not sure if creating a new mod extracts it though --[[User:Baliame|Baliame]] 14:29, 20 Oct 2007 (PDT)


== Flawed function ==
void CTeamMenu::OnCommand( const char *command ) function is flawed. --[[User:Mrpandey|Mrpandey]] 6:38, 06 Nov 2007 (GMT+5:45)


Mrpandey 6:38 (GMT + 5: 45), 05 Nov 2007
== DOESNT WORK ==


There are some flaws in the article posted:
this doesnt work for me with mp_teamplay 1. I can choose team, but sometimes the menu doesnt come up and ot doesnt sswitch team.
 
The following is the correct code:
1.
 
[code]
void CTeamMenu::OnCommand( const char *command )
{
    if (! Q_stricmp( command, "vguicancel" ) )
    { 
Close();
gViewPortInterface->ShowBackGround( false );
return;
    }
 
    engine->ClientCmd( const_cast<char *>( command ) );
    BaseClass::OnCommand(command);
}
[/code]
 
2. The functions used while rendering the model uses a lot of objects that are needed only the first time. They are not needed to be created on each rendering of the model. One can encapsulate this in the panel class itself so that the panel and the model and looked upon as one entity (C++ object) rather than two different things.

Latest revision as of 16:53, 30 October 2008

How can I (can I?) add CS:S buymenu to HL2SP mod Police Brutality?

Well I suppose you can, try checking out the source code for CS:S, I'm not sure if creating a new mod extracts it though --Baliame 14:29, 20 Oct 2007 (PDT)

Flawed function

void CTeamMenu::OnCommand( const char *command ) function is flawed. --Mrpandey 6:38, 06 Nov 2007 (GMT+5:45)

DOESNT WORK

this doesnt work for me with mp_teamplay 1. I can choose team, but sometimes the menu doesnt come up and ot doesnt sswitch team.