.| Autor | Beitrag |
|---|---|
|
000 08.01.2001, 12:13 Basman |
Hi,
Hier mal der Code: BOOL CHalfLifeTeamplay :: ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
int slot = atoi( CMD_ARGV(1) ); switch(pPlayer->m_iMenu)
case Menu_weapon1:
break; case Menu_weapon2:
break; //--------------------------------------------
}
// end addition // select the item from the current menu return TRUE;
else if (FStrEq(pcmd, "buy"))
return FALSE;
was mache ich falsch?
|
|
Profil || Suche |
|
001 08.01.2001, 14:21 DarKnight |
ShowMenu (pPlayer, 0x3F, 0, 0, "#weapon1_buy"); 0x3F ich glaub da werden die Anzahl der Einträge des Menüs eingerichtet. Musst die halt in deine 5 verändern!
void CHudSayText :: EnsureTextFitsInOneLineAndWrapIfHaveTo( int line ) -- Aja? |
|
Profil || Suche |
|
002 08.01.2001, 14:29 apfelkorn |
muuh...
|
|
Profil || Suche |
|
003 08.01.2001, 14:33 DarKnight |
Hi! steht in einem Tutorial. Es ist eine Hexadezimalzahl oder sowas. wenn man die net verändert gehts angeblich net. das was du gesagt hast ist natürlich selbstverständlich --void CHudSayText :: EnsureTextFitsInOneLineAndWrapIfHaveTo( int line ) -- Aja? |
|
Profil || Suche |
|
004 08.01.2001, 14:58 Basman |
111111111 in Binär ist in hex 1FF
--
|
|
Profil || Suche |
|
005 08.01.2001, 15:31 DarKnight |
Danke für die Aufklärung! --void CHudSayText :: EnsureTextFitsInOneLineAndWrapIfHaveTo( int line ) -- Aja? |
|
Profil || Suche |
|
006 08.01.2001, 15:42 Another1 |
@Basman: War das nit deine Frage im ICQ?? Uhm =) Ich dachte ich hatte es dir gesagt =)
Another1 ...relaxing..atm =) |
|
Profil || Suche |
|
007 08.01.2001, 21:39 Basman |
ja
|
|
Profil || Suche |
|
008 08.01.2001, 22:43 Another1 |
eigentlich nit, da bit 9 nur eben bit 9 erwicht (1<<9) (kannste ja ausrechnen ) --Another1 ...relaxing..atm =) |
|
Profil || Suche |
|
009 09.01.2001, 16:05 Basman |
hª: ; #define BIT1 1
nimm mªl Bit 10 oder so, dªnn ist BIT8 mit 128 in 512 schon drinn;
|
|
Profil || Suche |
|
010 09.01.2001, 16:31 Another1 |
NEEEIN!!!!
das heißt bit 4,5 und 8 sind 1 (von links gezählt), alle anderen Null, das is dann als wenn bei uns, sagen wir mal 9 an einer position an heißt an, und 0 heißt aus, das sehe dann so bei uns aus: 000990090 das wäre aber verschwendung, da man ja nur ein BIT (AN und AUS) pro bool oder schalter oder wasauchimmer brauch, da eine integer aber 4 byte (32 BIT) benutzt, heißt das, man kann in einer Integer 32 AN oder AUS werte unabhängig voneinander speichern! stell dir nun die zahl 2 als binär vor:
int bitfield = BIT1 | BIT4; // setze bit 1 und bit4
}; hoffe das hat geholfen =) --Another1 ...relaxing..atm =) |
|
Profil || Suche |
|
011 09.01.2001, 16:55 Basman |
Dann würde ich aber nicht schreiben/ oder dazu schreiben: #define XYX5 0x3F
das müsste dann aber alle Zahlen von 0-5 oder 0-10 freischalten. -- |
|
Profil || Suche |

