Results 1 to 2 of 2
  1. #1
    kxhashimoto's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    My Mood
    Bored

    Question Implementing textures in csgo

    So yeah I'm trying to get my own textures in the game.

    Here are the functions I made using the Valve SDK, thy are working aswell

    Code:
    unsigned int CreateNewTextureID(bool meh)
    { typedef unsigned int(__thiscall* OriginalFn)(void*, bool); return getvfunc<OriginalFn>(this, 43)(this, meh); } void DrawSetTextureRGBA(int TextureId, unsigned char const* rawRGBA, int W, int T, int h, bool f) { typedef void(__thiscall* OriginalFn)(void*, int, unsigned char const*, int, int, int, bool); return getvfunc<OriginalFn>(this, 37)(this, TextureId, rawRGBA, W, T, h , f); } bool IsTextureIDValid(int TextureID) { typedef bool(__thiscall* OriginalFn)(void*, int); return getvfunc<OriginalFn>(this, 42)(this, TextureID); } void DrawSetTexture(int TextureID) { typedef void(__thiscall* OriginalFn)(void*, int); return getvfunc<OriginalFn>(this, 38)(this, TextureID); } void DrawTexturedRect(int x0, int y0, int W, int T) { typedef void(__thiscall* OriginalFn)(void*, int, int, int, int); return getvfunc<OriginalFn>(this, 41)(this, x0, y0, W, T); }


    My only issue is, I can't load the .raw file of the image correctly in my csgo.

    I use Visual studio 2013 Ultimate, and if I try to use
    fopen
    It just wont load all of the image.

    Anyone got any idea?

    Also here is the function I made to actualy create and draw the Texture


    Code:
    void kappa(int w, int h)
    {
        bool m_bValid = false;
        unsigned int m_iTexture;
        if (last_texture == 0 || !Surface->IsTextureIDValid(last_texture))
        {
            m_iTexture = Surface->CreateNewTextureID(true);
            if (!m_iTexture)
                return;
            Surface->DrawSetTextureRGBA(m_iTexture, allah, (unsigned int)w, (unsigned int)h, 0, 1);
    
    
            
    
    
            if (Surface->IsTextureIDValid(m_iTexture)) m_bValid = true;
            last_texture = m_iTexture;
        }
        else{
            m_iTexture = last_texture;
        }
        Surface->DrawSetColor(RGBA(255, 255, 255, 255));
        Surface->DrawSetTexture(m_iTexture);
        int s_W, s_H; EngineClient->GetScreenSize(s_W, s_H);
        Surface->DrawTexturedRect(s_W - w, s_H - h, s_W, s_H);
    }


    And yes I know my coding style isn't good, please dont cry about it

    Any help is appreciated

    Last edited by kxhashimoto; 04-30-2016 at 04:15 AM.

  2. #2
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Depths Of My Mind.
    Posts
    17,468
    Reputation
    3771
    Thanks
    6,159
    My Mood
    Cheerful
    1 week has passed and no further replies have been made by the OP. Assuming solved.

    /Closed.

Similar Threads

  1. CSGO Player textures?
    By TheEpicBunnyPro in forum Counter-Strike 2 Help
    Replies: 0
    Last Post: 01-02-2015, 01:00 PM
  2. [Outdated] [CSGO] Red and Blue Player Textures (Yellow and Green heads) NO WALLHACK!
    By phuzed in forum Counter-Strike 2 Hacks
    Replies: 48
    Last Post: 10-12-2012, 07:08 AM
  3. [Photoshop] Cool Circuit Texture Tut
    By Jackal in forum Tutorials
    Replies: 13
    Last Post: 07-27-2006, 04:55 AM
  4. Liquid Texture: GIMP
    By Jackal in forum Tutorials
    Replies: 5
    Last Post: 07-09-2006, 03:20 PM
  5. [WR] 3rd Person Textures?
    By p4r4n0!4 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 12-29-2005, 03:23 PM