-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
const char* all_agents[64];
C++:
bool LoadTextureFromFile(const char* filename, PDIRECT3DTEXTURE9* out_texture, int* out_width, int* out_height)
{
PDIRECT3DTEXTURE9 texture;
HRESULT hr = D3DXCreateTextureFromFileA(c_menu::get().device, filename, &texture);
if (hr != S_OK)
return false;
D3DSURFACE_DESC my_image_desc;
texture->GetLevelDesc(0, &my_image_desc);
*out_texture = texture;
*out_width = (int)my_image_desc.Width;
*out_height = (int)my_image_desc.Height;
return true;
}
void get_agents_preview()
{
for (int i = 0; i < 63; i++)
{
int my_image_width = 0;
int my_image_height = 0;
bool ret = LoadTextureFromFile(std::string("C:\\Oreo\\Images\\").append(std::to_string(i)).append(".png").c_str(), &my_texture[i], &my_image_width, &my_image_height);
IM_ASSERT(ret);
}
}
C++:
get_agents_preview();
for (int i = 0; i < 63; i++)
all_agents[i] = player_models[i];
C++:
ImGui::MenuChild("Agents", ImVec2(668, 570));
{
auto same_line_counter = 0;
ImGui::SetCursorPosX(2);
for (int i = 0; i < 63; i++)
{
ImGui::BeginGroup();
if (ImGui::ImageButton(my_texture[i], ImVec2(100, 76)))
{
g_cfg.player.player_models = i;
}
ImGui::EndGroup();
if (same_line_counter < 5) {
ImGui::SameLine();
same_line_counter++;
}
else {
padding(2, 2);
same_line_counter = 0;
}
}
}
ImGui::EndChild();
Код:
const char* player_models[] =
{
"None",
"Cmdr. Davida 'Goggles' Fernandez | SEAL Frogman",
"Cmdr. Frank 'Wet Sox' Baroud | SEAL Frogman",
"Lieutenant Rex Krikey | SEAL Frogman",
"Michael Syfers | FBI Sniper",
"Operator | FBI SWAT",
"Special Agent Ava | FBI",
"Markus Delrow | FBI HRT",
"Sous-Lieutenant Medic | Gendarmerie Nationale",
"Chem-Haz Capitaine | Gendarmerie Nationale",
"Chef d'Escadron Rouchard | Gendarmerie Nationale",
"Aspirant | Gendarmerie Nationale",
"Officer Jacques Beltram | Gendarmerie Nationale",
"D Squadron Officer | NZSAS",
"B Squadron Officer | SAS",
"Seal Team 6 Soldier | NSWC SEAL",
"Buckshot | NSWC SEAL",
"Lt. Commander Ricksaw | NSWC SEAL",
"Blueberries' Buckshot | NSWC SEAL",
"3rd Commando Company | KSK",
"Two Times' McCoy | TACP Cavalry",
"Two Times' McCoy | USAF TACP",
"Primeiro Tenente | Brazilian 1st Battalion",
"Cmdr. Mae 'Dead Cold' Jamison | SWAT",
"1st Lieutenant Farlow | SWAT",
"John 'Van Healen' Kask | SWAT",
"Bio-Haz Specialist | SWAT",
"Sergeant Bombson | SWAT",
"Chem-Haz Specialist | SWAT",
"Lieutenant 'Tree Hugger' Farlow | SWAT",
"Getaway Sally | The Professionals",
"Number K | The Professionals",
"Little Kev | The Professionals",
"Safecracker Voltzmann | The Professionals",
"Bloody Darryl The Strapped | The Professionals",
"Sir Bloody Loudmouth Darryl | The Professionals",
"Sir Bloody Darryl Royale | The Professionals",
"Sir Bloody Skullhead Darryl | The Professionals",
"Sir Bloody Silent Darryl | The Professionals",
"Sir Bloody Miami Darryl | The Professionals",
"Street Soldier | Phoenix",
"Soldier | Phoenix",
"Slingshot | Phoenix",
"Enforcer | Phoenix",
"Mr. Muhlik | Elite Crew",
"Prof. Shahmat | Elite Crew",
"Osiris | Elite Crew",
"Ground Rebel | Elite Crew",
"The Elite Mr. Muhlik | Elite Crew",
"Trapper | Guerrilla Warfare",
"Trapper Aggressor | Guerrilla Warfare",
"Vypa Sista of the Revolution | Guerrilla Warfare",
"Col. Mangos Dabisi | Guerrilla Warfare",
//"Arno The Overgrown | Guerrilla Warfare",
"Medium Rare' Crasswater | Guerrilla Warfare",
"Crasswater The Forgotten | Guerrilla Warfare",
"Elite Trapper Solman | Guerrilla Warfare",
"The Doctor' Romanov | Sabre",
"Blackwolf | Sabre",
"Maximus | Sabre",
"Dragomir | Sabre",
"Rezan The Ready | Sabre",
"Rezan the Redshirt | Sabre",
"Dragomir | Sabre Footsoldier"
};
static const char* player_models[] =
{
"models/player/custom_player/legacy/ctm_diver_varianta.mdl", // Cmdr. Davida 'Goggles' Fernandez | SEAL Frogman
"models/player/custom_player/legacy/ctm_diver_variantb.mdl", // Cmdr. Frank 'Wet Sox' Baroud | SEAL Frogman
"models/player/custom_player/legacy/ctm_diver_variantc.mdl", // Lieutenant Rex Krikey | SEAL Frogman
"models/player/custom_player/legacy/ctm_fbi_varianth.mdl", // Michael Syfers | FBI Sniper
"models/player/custom_player/legacy/ctm_fbi_variantf.mdl", // Operator | FBI SWAT
"models/player/custom_player/legacy/ctm_fbi_variantb.mdl", // Special Agent Ava | FBI
"models/player/custom_player/legacy/ctm_fbi_variantg.mdl", // Markus Delrow | FBI HRT
"models/player/custom_player/legacy/ctm_gendarmerie_varianta.mdl", // Sous-Lieutenant Medic | Gendarmerie Nationale
"models/player/custom_player/legacy/ctm_gendarmerie_variantb.mdl", // Chem-Haz Capitaine | Gendarmerie Nationale
"models/player/custom_player/legacy/ctm_gendarmerie_variantc.mdl", // Chef d'Escadron Rouchard | Gendarmerie Nationale
"models/player/custom_player/legacy/ctm_gendarmerie_variantd.mdl", // Aspirant | Gendarmerie Nationale
"models/player/custom_player/legacy/ctm_gendarmerie_variante.mdl", // Officer Jacques Beltram | Gendarmerie Nationale
"models/player/custom_player/legacy/ctm_sas_variantg.mdl", // D Squadron Officer | NZSAS
"models/player/custom_player/legacy/ctm_sas_variantf.mdl", // B Squadron Officer | SAS
"models/player/custom_player/legacy/ctm_st6_variante.mdl", // Seal Team 6 Soldier | NSWC SEAL
"models/player/custom_player/legacy/ctm_st6_variantg.mdl", // Buckshot | NSWC SEAL
"models/player/custom_player/legacy/ctm_st6_varianti.mdl", // Lt. Commander Ricksaw | NSWC SEAL
"models/player/custom_player/legacy/ctm_st6_variantj.mdl", // 'Blueberries' Buckshot | NSWC SEAL
"models/player/custom_player/legacy/ctm_st6_variantk.mdl", // 3rd Commando Company | KSK
"models/player/custom_player/legacy/ctm_st6_variantl.mdl", // 'Two Times' McCoy | TACP Cavalry
"models/player/custom_player/legacy/ctm_st6_variantm.mdl", // 'Two Times' McCoy | USAF TACP
"models/player/custom_player/legacy/ctm_st6_variantn.mdl", // Primeiro Tenente | Brazilian 1st Battalion
"models/player/custom_player/legacy/ctm_swat_variante.mdl", // Cmdr. Mae 'Dead Cold' Jamison | SWAT
"models/player/custom_player/legacy/ctm_swat_variantf.mdl", // 1st Lieutenant Farlow | SWAT
"models/player/custom_player/legacy/ctm_swat_variantg.mdl", // John 'Van Healen' Kask | SWAT
"models/player/custom_player/legacy/ctm_swat_varianth.mdl", // Bio-Haz Specialist | SWAT
"models/player/custom_player/legacy/ctm_swat_varianti.mdl", // Sergeant Bombson | SWAT
"models/player/custom_player/legacy/ctm_swat_variantj.mdl", // Chem-Haz Specialist | SWAT
"models/player/custom_player/legacy/ctm_swat_variantk.mdl", // Lieutenant 'Tree Hugger' Farlow | SWAT
"models/player/custom_player/legacy/tm_professional_varj.mdl", // Getaway Sally | The Professionals
"models/player/custom_player/legacy/tm_professional_vari.mdl", // Number K | The Professionals
"models/player/custom_player/legacy/tm_professional_varh.mdl", // Little Kev | The Professionals
"models/player/custom_player/legacy/tm_professional_varg.mdl", // Safecracker Voltzmann | The Professionals
"models/player/custom_player/legacy/tm_professional_varf5.mdl", // Bloody Darryl The Strapped | The Professionals
"models/player/custom_player/legacy/tm_professional_varf4.mdl", // Sir Bloody Loudmouth Darryl | The Professionals
"models/player/custom_player/legacy/tm_professional_varf3.mdl", // Sir Bloody Darryl Royale | The Professionals
"models/player/custom_player/legacy/tm_professional_varf2.mdl", // Sir Bloody Skullhead Darryl | The Professionals
"models/player/custom_player/legacy/tm_professional_varf1.mdl", // Sir Bloody Silent Darryl | The Professionals
"models/player/custom_player/legacy/tm_professional_varf.mdl", // Sir Bloody Miami Darryl | The Professionals
"models/player/custom_player/legacy/tm_phoenix_varianti.mdl", // Street Soldier | Phoenix
"models/player/custom_player/legacy/tm_phoenix_varianth.mdl", // Soldier | Phoenix
"models/player/custom_player/legacy/tm_phoenix_variantg.mdl", // Slingshot | Phoenix
"models/player/custom_player/legacy/tm_phoenix_variantf.mdl", // Enforcer | Phoenix
"models/player/custom_player/legacy/tm_leet_variantj.mdl", // Mr. Muhlik | Elite Crew
"models/player/custom_player/legacy/tm_leet_varianti.mdl", // Prof. Shahmat | Elite Crew
"models/player/custom_player/legacy/tm_leet_varianth.mdl", // Osiris | Elite Crew
"models/player/custom_player/legacy/tm_leet_variantg.mdl", // Ground Rebel | Elite Crew
"models/player/custom_player/legacy/tm_leet_variantf.mdl", // The Elite Mr. Muhlik | Elite Crew
"models/player/custom_player/legacy/tm_jungle_raider_variantf2.mdl", // Trapper | Guerrilla Warfare
"models/player/custom_player/legacy/tm_jungle_raider_variantf.mdl", // Trapper Aggressor | Guerrilla Warfare
"models/player/custom_player/legacy/tm_jungle_raider_variante.mdl", // Vypa Sista of the Revolution | Guerrilla Warfare
"models/player/custom_player/legacy/tm_jungle_raider_variantd.mdl", // Col. Mangos Dabisi | Guerrilla Warfare
//"models/player/custom_player/legacy/tm_jungle_raider_variant.mdl", // Arno The Overgrown | Guerrilla Warfare
"models/player/custom_player/legacy/tm_jungle_raider_variantb2.mdl", // 'Medium Rare' Crasswater | Guerrilla Warfare
"models/player/custom_player/legacy/tm_jungle_raider_variantb.mdl", // Crasswater The Forgotten | Guerrilla Warfare
"models/player/custom_player/legacy/tm_jungle_raider_varianta.mdl", // Elite Trapper Solman | Guerrilla Warfare
"models/player/custom_player/legacy/tm_balkan_varianth.mdl", // 'The Doctor' Romanov | Sabre
"models/player/custom_player/legacy/tm_balkan_variantj.mdl", // Blackwolf | Sabre
"models/player/custom_player/legacy/tm_balkan_varianti.mdl", // Maximus | Sabre
"models/player/custom_player/legacy/tm_balkan_variantf.mdl", // Dragomir | Sabre
"models/player/custom_player/legacy/tm_balkan_variantg.mdl", // Rezan The Ready | Sabre
"models/player/custom_player/legacy/tm_balkan_variantk.mdl", // Rezan the Redshirt | Sabre
"models/player/custom_player/legacy/tm_balkan_variantl.mdl", // Dragomir | Sabre Footsoldier
};
Готово. Теперь у вас самый простой превью для агентов