Results 1 to 9 of 9
  1. #1
    **Seals**'s Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    1,183
    Reputation
    102
    Thanks
    181
    My Mood
    Breezy

    Print to console

    [highlight=cpp]void __declspec(naked) Con_Print(char* String)
    {
    /*va_list va;
    char buf[300] = "";
    va_start(va, String);
    vsprintf(buf, String, va);
    va_end(va);*/
    static DWORD console = 0x0044FAA0;
    __asm{
    push String
    push 0
    call console
    add esp, 8
    };
    }[/highlight]
    So I got that code and I want to print a text into the console. Actually it works and the text gets printed the point is that it prints some cube characters of the hell. Can some1 please help me?

  2. #2
    lolbie's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Netherlands
    Posts
    5,207
    Reputation
    288
    Thanks
    2,090
    My Mood
    Angelic
    uhm... what do you mean with print? write
    I love it when people keep their agreements /sarcasm ftw

  3. #3

  4. #4
    lolbie's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Netherlands
    Posts
    5,207
    Reputation
    288
    Thanks
    2,090
    My Mood
    Angelic
    Nop sorry

    post it in the c++ section

    ( i don't know nothing about c++ )

    sorry
    I love it when people keep their agreements /sarcasm ftw

  5. #5
    **Seals**'s Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    1,183
    Reputation
    102
    Thanks
    181
    My Mood
    Breezy
    yea. Well this is dedicated to BO ;P And Ikr that you don't know C++ but you know, my trolls fails.

  6. #6
    lolbie's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Netherlands
    Posts
    5,207
    Reputation
    288
    Thanks
    2,090
    My Mood
    Angelic
    Quote Originally Posted by **Seals** View Post
    yea. Well this is dedicated to BO ;P And Ikr that you don't know C++ but you know, my trolls fails.
    yeah and so does your english... and i know that too i know what the code is doing but i don't know what is wrong
    I love it when people keep their agreements /sarcasm ftw

  7. #7
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    8,782
    Reputation
    769
    Thanks
    1,846
    My Mood
    Doh
    Quote Originally Posted by lolbie View Post


    yeah and so does your english... and i know that too i know what the code is doing but i don't know what is wrong
    if you think that my english fails and yours is better then why saying the opposite and destroying your dreams? Anyways enough for the off topic. Can some1 help me?
    mm, maybe if I use LPCWSTR, or whatever it's called?


  8. #8
    d0h's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    trashbin
    Posts
    298
    Reputation
    24
    Thanks
    142
    My Mood
    Doh
    dont know what you mean, funny that you use an alt to ask for help instead of using your mainchar..

    Code:
        void (__cdecl*SendConsoleCommand)(int ,int ,char *) = (void (__cdecl *)(int,int,char *))0x00DEAD;

  9. #9
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    8,782
    Reputation
    769
    Thanks
    1,846
    My Mood
    Doh
    Quote Originally Posted by d0h View Post
    dont know what you mean, funny that you use an alt to ask for help instead of using your mainchar..

    Code:
        void (__cdecl*SendConsoleCommand)(int ,int ,char *) = (void (__cdecl *)(int,int,char *))0x00DEAD;
    No no. I was banned at this one
    Anyways I don't mean the send command to console. I want to write a text in the console. Like that shit.."==== FS_Startup ===="

    EDIT:
    Oh wait I think I got it...
    Code:
    typedef void (Com_Printf_)(char*);
    Com_Printf_ *Com_Printf = (Com_Printf_*)0x44FAA0;
    Last edited by ♪~ ᕕ(ᐛ)ᕗ; 07-07-2011 at 07:23 AM.