google-site-verification: googlebaca44933768a824.html Text loading. - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

Text loading.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Text loading.

    Hi, well i'm just new here so pls take care :D

    I'm looking for a c++ command..

    a command to let text fill in the console.
    like its loading.. letter for letter...

    i hope you understand what i mean :D

    #2
    Re: Text loading.

    Code:
    CreateInterfaceFn gameUIFactory = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("gameui.dll"," CreateInterface");
    m_pConsole = (IGameConsole*)gameUIFactory("GameConsole003", NULL);
    m_pConsole->ColorPrintf(color3,"+++ Features:\n");

    m_pConsole = IGameConsole

    Comment


      #3
      Re: Text loading.

      well i mean the normal console not ingame. - that black one :D

      Last edited by Zlaax; 04-25-2010, 09:10 PM.

      Comment


        #4
        Re: Text loading.

        Have fun
        Code:
        cConLog::cConLog()
        {
        	AllocConsole();
        	SetConsoleTitle("LIFE-STYLE Console Log");
        	this->m_hConsoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);
        	SetConsoleTextAttribute(this->m_hConsoleHandle,FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
        	COORD size; size.X = 500; size.Y = 200;
        	SetConsoleScreenBufferSize(this->m_hConsoleHandle,size);
        
        	this->Write(true," _     ___ _____ _____     ____ _______   ___     _____ ");
        	this->Write(true,"| |   |_ _|  ___| ____|   / ___|_   _\\ \\ / / |   | ____|");
            this->Write(true,"| |    | || |_  |  _| ____\\___ \\ | |  \\ V /| |   |  _|  ");
        	this->Write(true,"| |___ | ||  _| | |__|_____|__) || |   | | | |___| |___ ");
        	this->Write(true,"|_____|___|_|   |_____|   |____/ |_|   |_| |_____|_____|\n");
        	this->Write(true,"==>> LIFE-STYLE Console Log\n");
        }
        
        cConLog::~cConLog()
        {
        	FreeConsole();
        }
        
        void cConLog::Write(bool bFinishLine,const char *pszText,...)
        {
        	char szBuffer[256] = {'\0'};
        	va_list vaParameters;
        	va_start(vaParameters, pszText);
        	vsprintf(szBuffer, pszText, vaParameters);
        	va_end(vaParameters);
        
        	if (bFinishLine)
        		strcat(szBuffer,"\n");
        
        	WriteConsole(this->m_hConsoleHandle,szBuffer,lstrlenA(szBuffer),0,0);
        }
        or you just use std::cout << "TEXT" << endl;
        but if you are in a dll, you have to use the 1. one

        Comment


          #5
          Re: Text loading.

          thanks but i know about cout :)

          Again: I'm looking for a code..

          That will open the console ( I know how to do)

          And then in, for example, 10 secs. to fill in letter for letter -

          it looks like someone is writing it. Letter for letter appears.

          Comment


            #6
            Re: Text loading.

            do you make a hack and have all this interfaces loaded?
            well then you could use
            Code:
            static int index = 0;
            const char *text = "Hello";
            static float oldtime = m_pGlobals->curtime;
            if (oldtime + 1/*= 1 second*/ < m_pGlobals->curtime)
            {
            // Write your char here: text[index]
            index++;
            }
            coded this in this reply field, so you shouldnt copy^^


            else:
            make a new thread and use sleep^^

            Comment


              #7
              Re: Text loading.

              Well are you in a ingame DLL? Or do you mean in a console app?

              console app version:

              Code:
              int main()
              {
              	srand( (unsigned int) time( NULL ) );
              
              	const char* str = "omg it looks like i was typing this shit";
              
              	for( int i = 0; i < strlen(str); i++ )
              	{
              		cout << str[i];
              
              		Sleep( (DWORD)( rand() % 200 ) );
              	}
              }

              Comment


                #8
                Re: Text loading.

                yea i mean that console app that black one..

                that code looks ok. but i dont know actually if it works..
                I tryed but it didn't worked.
                I'm just a beginner in c++ and i can't find now what is wrong..

                Comment


                  #9
                  Re: Text loading.

                  Yeah thank you it works :D

                  Comment


                    #10
                    Re: Text loading.

                    If you are a slow typer use Sleep( (DWORD)( rand() % 500 ) ); btw :P

                    Comment


                      #11
                      Re: Text loading.

                      It's just for the "writting" effect. i tried with 375 or so.. it looks pretty good :)

                      Comment


                        #12
                        Re: Text loading.

                        Originally posted by Lawgiver View Post
                        If you are a slow typer use Sleep( (DWORD)( rand() % 500 ) ); btw :P
                        Rofl, that's good.

                        Comment

                        Working...
                        X