-
Автор темы
- #1
Ну привет сладкий, тут я тебе покажу как спастить самую не ебаться полезную функцию
Ето говно базируется на скинчейнджере
но если ты знатный любитель индиго то тебе сюда
Credits: Крайслер, Zidjey
Пожалуйста, авторизуйтесь для просмотра ссылки.
(там авто пейнткит дампер так что бегом пастить),но если ты знатный любитель индиго то тебе сюда
ну что поiхалi
с изменениями nSkinz закончили
и сам код этого говна
заменяем структуру paint_kit на эту
Код:
struct paint_kit
{
int id;
std::string name;
std::string cdn_name;
auto operator < (const paint_kit& other) const -> bool
{
return name < other.name;
}
};
Код:
//После этого
const auto wide_name = g_localize->Find(paint_kit->item_name.buffer);
//это
const auto cdn_name = paint_kit->name.buffer;
Код:
//это меняем на это
if(paint_kit->id < 10000)
k_skins.push_back({ paint_kit->id, name});
else
k_gloves.push_back({ paint_kit->id, name});
if(paint_kit->id < 10000)
k_skins.push_back({ paint_kit->id, name, cdn_name });
else
k_gloves.push_back({ paint_kit->id, name, cdn_name });
добавим это
это
и это
Код:
const std::vector<weapon_name> cdn_weapon_names =
{
{ WEAPON_KNIFE, "Knife" },
{ GLOVE_T_SIDE, "Glove" },
{ 7, "ak47" },
{ 8, "aug" },
{ 9, "awp" },
{ 63, "cz75a" },
{ 1, "deagle" },
{ 2, "elite" },
{ 10, "famas" },
{ 3, "fiveseven" },
{ 11, "g3sg1" },
{ 13, "galilar" },
{ 4, "glock" },
{ 14, "m249" },
{ 60, "m4a1_silencer" },
{ 16, "m4a1" },
{ 17, "mac10" },
{ 27, "mag7" },
{ 33, "mp7" },
{ 34, "mp9" },
{ 28, "negev" },
{ 35, "nova" },
{ 32, "hkp2000" },
{ 36, "p250" },
{ 19, "p90" },
{ 26, "bizon" },
{ 64, "revolver" },
{ 29, "sawedoff" },
{ 38, "scar20" },
{ 40, "ssg08" },
{ 39, "sg556" },
{ 30, "tec9" },
{ 24, "ump45" },
{ 61, "usp_silencer" },
{ 25, "xm1014" },
};
Код:
const std::vector<weapon_name> cdn_glove_names =
{
{ 0, "Default" },
{ GLOVE_STUDDED_BLOODHOUND, "Bloodhound" },
{ GLOVE_T_SIDE, "Default (Terrorists)" },
{ GLOVE_CT_SIDE, "Default (Counter-Terrorists)" },
{ GLOVE_SPORTY, "sporty_gloves" },
{ GLOVE_SLICK, "slick_gloves" },
{ GLOVE_LEATHER_WRAP, "leather_handwraps" },
{ GLOVE_MOTORCYCLE, "motorcycle_gloves" },
{ GLOVE_SPECIALIST, "specialist_gloves" },
{ GLOVE_HYDRA, "studded_hydra" }
};
Код:
const std::vector<weapon_name> cdn_knife_names =
{
{ 0, "knife_t" },
{ WEAPON_KNIFE_BAYONET, "knife_bayonet" },
{ WEAPON_KNIFE_FLIP, "knife_flip" },
{ WEAPON_KNIFE_GUT, "knife_gut" },
{ WEAPON_KNIFE_KARAMBIT, "knife_karambit" },
{ WEAPON_KNIFE_M9_BAYONET, "knife_m9_bayonet" },
{ WEAPON_KNIFE_TACTICAL, "knife_tactical" },
{ WEAPON_KNIFE_FALCHION, "knife_falchion" },
{ WEAPON_KNIFE_SURVIVAL_BOWIE, "knife_survival_bowie" },
{ WEAPON_KNIFE_BUTTERFLY, "knife_butterfly" },
{ WEAPON_KNIFE_PUSH, "knife_push" }
};
добавить
Код:
extern const std::vector<weapon_name> cdn_knife_names;
extern const std::vector<weapon_name> cdn_glove_names;
extern const std::vector<weapon_name> cdn_weapon_names;
с изменениями nSkinz закончили
Код:
#include "Preview.h"
#include <d3d9.h>
#include "D3dx9tex.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
using namespace std;
namespace Preview
{
string FindURl(string paintName, string weapon)
{
ifstream inFile;
inFile.open(".\\csgo\\scripts\\items\\items_game_cdn.txt");//path: to item cdn list
string line;
//int founds = 0;
unsigned int curLine = 0;
string search = paintName.append("=");
//string weapon = "aug";
while (getline(inFile, line)) {
curLine++;
if (line.find(search, 0) != string::npos) {
if (line.find(weapon, 0) != string::npos)
{
//cout << "link: " << << endl;
return line.substr(line.find(search)).erase(0, search.length()); //DOSTAEM SSILKU
}
}
}
return "nf";
}
std::string DownloadBytes(const char * const szUrl)
{
HINTERNET hOpen = NULL;
HINTERNET hFile = NULL;
char* lpBuffer = NULL;
DWORD dwBytesRead = 0;
//Pointer to dynamic buffer.
char *data = 0;
//Dynamic data size.
DWORD dataSize = 0;
hOpen = InternetOpenA("smef.pw INDIGO/4.3 paste", NULL, NULL, NULL, NULL);
if (!hOpen) return (char*)"";
hFile = InternetOpenUrlA(hOpen, szUrl, NULL, NULL, INTERNET_FLAG_RELOAD | INTERNET_FLAG_DONT_CACHE, NULL);
if (!hFile) {
InternetCloseHandle(hOpen);
return (char*)"";
}
std::string output;
do {
char buffer[2000];
InternetReadFile(hFile, (LPVOID)buffer, _countof(buffer), &dwBytesRead);
output.append(buffer, dwBytesRead);
} while (dwBytesRead);
InternetCloseHandle(hFile);
InternetCloseHandle(hOpen);
return output;
}
void UpdatePic(IDirect3DDevice9* thisptr,std::string link, IDirect3DTexture9* texture, bool* show)
{
texture = nullptr;
if (texture == nullptr) {
string imData = DownloadBytes(link.c_str());
D3DXCreateTextureFromFileInMemoryEx(thisptr
, imData.data(), imData.length(),
512, 384, D3DX_DEFAULT,
0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED,
D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture);
}
}
}
Код:
#pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <Windows.h>
#include <WinInet.h>
#include <d3d9.h>
#pragma comment(lib, "wininet.lib")
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
namespace Preview {
std::string FindURl(std::string paintName, std::string weapon);
std::string DownloadBytes(const char * const szUrl);
void UpdatePic(IDirect3DDevice9* thisptr, std::string link, IDirect3DTexture9* texture, bool* show);
}
Код:
ImGui::Begin("SkinPrev", nullptr);
{
static std::string weapon = "";
static std::string kit = "";
static std::string link = "";
static bool show_pic = false;
if (ImGui::Button("Req prev"))
{
skinImg = nullptr;
if (selected_entry.definition_index == WEAPON_KNIFE)
weapon = cdn_knife_names[selected_entry.definition_override_vector_index].name;
else if (selected_entry.definition_index == GLOVE_T_SIDE)
weapon = cdn_glove_names[selected_entry.definition_override_vector_index].name;
else
weapon = cdn_weapon_names.at(selected_entry.definition_vector_index).name;
if (selected_entry.definition_index == GLOVE_T_SIDE)
kit = k_gloves[selected_entry.paint_kit_vector_index].cdn_name;
else
kit = k_skins[selected_entry.paint_kit_vector_index].cdn_name;
link = Preview::FindURl(kit, weapon);
if (skinImg == nullptr) {
std::string imData = Preview::DownloadBytes(link.c_str());
D3DXCreateTextureFromFileInMemoryEx(thisptr
, imData.data(), imData.length(),
512, 384, D3DX_DEFAULT,
0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED,
D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &skinImg);
}
//Preview::UpdatePic(thisptr, link, skinImg, &show_pic);
show_pic = true;
}
if (show_pic)
{
ImGui::Image(skinImg, ImVec2(512, 384));
}
ImGui::Text(weapon.c_str());
ImGui::Text(kit.c_str());
ImGui::Text(link.c_str());
}
ImGui::End();
Последнее редактирование: