Hey so I found a slightly working way of keeping your knife changed, but This is very glitchly still so here are the results :
gyazo.com/5eb55d67d3ab79bacae9e4c1dbae1872
gyazo.com/da902e26cb755b980c455cf54d1c0b70
gyazo.com/df2ea5ce04f9b1aa79e995f4ef48dca4
gyazo.com/18aa6c78507fd4234d595bd7d81c1ce6
What you need to do is this:
Code:
//DWORD Thing = Read(Client + 0x4A14C54); //you dont need this doesnt work with these offsets
//Write(Thing + 0x254, 507); //you dont need this doesnt work with these offsets
Write(weaponEntity + iItemDefinitionIndex, 507);
Write(weaponEntity + iViewModelIndex, 326);
Write(LocalBase + iWorldModelIndex, 327);
Write(weaponEntity + iItemIDHigh, -1);
Write(weaponEntity + nFallbackStatTrak, 6262);
Write(weaponEntity + nFallbackPaintKit, 38);
Write(weaponEntity + flFallbackWear, 0.000001);
Now ingame when you use the knife you get flickering. To stop the flickering you need to force update this at the correct time, very fiddly but If you set it up right you can make it force update automatically at the right time possibly and have it stay like that till you change weapon. Then it glitches again, thanks to others for small bits of info. If you find a way of keeping it or anything intresting please post below your findings Not taking much credit for this since pretty much all of this was posted before lol, just no one thought about force updating.
P.S Only works online atm, so mm, or community servers.
Another note If you want to draw the skin It's quite weird and fiddly as well but make sure you have the same placement then in your if statement before this you need to use WEAPON_KNIFE_T || WEAPON_KNIFE || WEAPON_KNIFE_KARAMBIT
Does mean its kinda glitchy in other ways but thats the way I found so far.
Another note again "The Thing " is apparently hViewModel, recvproxy but I just call it the thing, *addition , it does nothing atm disregard what I say above about it since it's outdated.
NEW EDIT:
So I am going to explain how to make this nicer + make your skin changer completely efficient / never fail pretty much (NOT KNIFE CHANGER) , now this is mainly for people who won't have terrible pc's since It can lag you out slightly but pretty much your gonna want to setup a forceupdate loop kind of thing like so :
Code:
if (GetAsyncKeyState(0x51) || GetAsyncKeyState(0x31) || GetAsyncKeyState(0x32) || GetAsyncKeyState(0x33))
//this bit is checking if you change weapon pretty much using q or 1,2,3 You can add your own here for scroll wheel if u want or use another method like checking if the player changes weapon but this is just a simple way of doing it.
Code:
Sleep(100); now you can change this is whatever I recommend trying different times to get what you want/works best.
EnginePointer = Read(EngineDLL + ClientState); //these 2 bits force update the game
Write(EnginePointer + 0x16C, -1); //these 2 bits force update the game
now when you change weapon you pretty much always have the skin assigned so it never glitches except when you buy but then all you do is change weapon. Pretty simple and a easy way of doing this you can of course do something with checking weapon and seeing if it changes but this works fine if you don't use different keys
NEW EDIT AGAIN
So after some more trying and failing I've found a method which is annoying but works if you have the patience to sit there failing till you get the perfect delay or w/e
So pretty much your using what I said above but on a different scale this time so what You do is firstly you have a check like so:
Code:
if (CurrentWeapon == WEAPON_KNIFE || CurrentWeapon == WEAPON_KNIFE_T)
This checks your weapon, if its a default knife etc, next you want a loop or w/e this is a simple method of copy and pasters :
EnginePointer = Mem(EngineDLL + ClientState);
Mem(EnginePointer + 0x16C, -1);
Sleep(200);
Mem(EnginePointer + 0x16C, -1);
Sleep(200);
Mem.Write<int>(EnginePointer + 0x16C, -1);
Sleep(200);
Mem(EnginePointer + 0x16C, -1);
Sleep(200);
Mem(EnginePointer + 0x16C, -1);
Sleep(200);
Mem(EnginePointer + 0x16C, -1);
So The aim of this loop kinda thing is to keep force updating, this is a simple way there's better ways but I don't want no thinkers to have it , anyways so what this does is lag the game which means this method completely depends on ping and so on, which is why on servers with 100+ ping you don't need any of this just a forceupdate and its done. but if you have 30ping 50ping or whatever it needs changing which is why you have to work that out yourself. So gl and hf and one more thing if you want to keep making your weapons force change like i said above just add something like this below the knife part :
Code:
else
{
EnginePointer = Mem(EngineDLL + ClientState);
Mem(EnginePointer + 0x16C, -1);
}
this means that you only lag for the knife changer not the skin well not as badly
If anyone finds some other way feel free to help out, I will be posting a tutorial on how to do a skin and knife changer externally tommorow night to help out everyone . Now keep in mind I'm still quite new so I'm not saying this is the only or anywhere near the best way of doing it but it works So yeah have fun