Willkommen ~Gast!
Registrieren || Einloggen || Hilfe/FAQ || Staff
Probleme mit der Registrierung im Forum? Melde dich unter registerEin Bild.
Autor Beitrag
000
09.07.2008, 19:20
Konsti



Hi,
Wie mache ich ein buymenu? (so wie in css)
und wie rufe ich das buymenu mit einer bestimmten daste auf? (wie b in css)

ich glaube ich brauche dafür irgendwie VGUI ....

mfg

--

AHHHHHHHHHHHHHHHHHH

zum Seitenanfang zum Seitenende Profil || Suche
001
09.07.2008, 19:46
Bluthund



Ja du musst ein VGUI-Menü schreiben. Den Aufruf dessen führst du dann über nen ClientCommand durch. Den kannst du dann entsprechend auf ne Taste legen...

--

The C language combines all the power of assembly language with all the ease-of-use of assembly language.
"humorig is n blödwort :>" by -CarniGGeLjumpR-

zum Seitenanfang zum Seitenende Profil || Suche
002
09.07.2008, 20:54
Konsti



danke für die antwort aber noch eine frage:
http://developer.valvesoftware.com/wiki/ClientCommand()
hier steht dieses beispiel:
Quellcode:client:
    engine->ServerCmd( VarArgs("MyCommand %i", m_iMyNumber) ); // No variables? Pass the command as a simple string.
server:
    bool CBasePlayer::ClientCommand( const CCommand &args )
    {
        if ( !V_stricmp( args[0], "MyCommand" ) )
        {
            Msg( "MyCommand received! Value: %i\n", atoi(args[1]) );
            return true;
        }
    }
wo und wie muss ich die taste hinschreiben die gedrückt werden soll und was bedeutet m_iMyNumber?

--

AHHHHHHHHHHHHHHHHHH

zum Seitenanfang zum Seitenende Profil || Suche
003
09.07.2008, 21:47
Bluthund



Die Taste wird nicht hardcoded deswegen schreibt man sich ja nen ClientCommand, den man dann per ingame-Config an ne Taste binden kann.
Wie "was bedeutet m_iMyNumber"?! Die Verwendung der Variable im Code ist doch sogar schon dokumentiert. Oder scheiterst du am Formatstring + variable Argumentanzahl? ->

--

The C language combines all the power of assembly language with all the ease-of-use of assembly language.
"humorig is n blödwort :>" by -CarniGGeLjumpR-

zum Seitenanfang zum Seitenende Profil || Suche
004
09.07.2008, 23:05
Konsti



ja ich verstehe also wenn my command dann buy ist muss in der config bind buy b sein oder?

wenn ich morgen mal teste und es geht ist das problem gelöst

--

AHHHHHHHHHHHHHHHHHH

zum Seitenanfang zum Seitenende Profil || Suche
005
11.07.2008, 00:48
Flinti



ganz genau;)

--

zum Seitenanfang zum Seitenende Profil || Suche
006
27.08.2008, 21:40
Konsti



kann man überhaupt ein buy menu in einem ep2 sp mod verwenden?

mfg

--

AHHHHHHHHHHHHHHHHHH

zum Seitenanfang zum Seitenende Profil || Suche
007
27.08.2008, 22:49
Bluthund



Natürlich kann man das, wenn man es codet...

--

The C language combines all the power of assembly language with all the ease-of-use of assembly language.
"humorig is n blödwort :>" by -CarniGGeLjumpR-

zum Seitenanfang zum Seitenende Profil || Suche