Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Change Main Icon by GetMainInfo  (Visto 2418 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Betell Host Posteado: August 05, 2022, 01:15:15 PM | Modificado: August 05, 2022, 08:34:32 PM by Betell Host

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 421
  • Gracias recibida: 1971
  • br
Código para mudar o Icon pelo GetMainInfo



ICON

Code: [Select]
resource.h

#define IDI_ICON1                       109
#define IDI_ICON2                       110
#define IDI_ICON3                       111
#define IDI_ICON4                       112
#define IDI_ICON5                       113

Code: [Select]
Main.rc

IDI_ICON1               ICON                    "Main.ico"
IDI_ICON2               ICON                    "MainEx.ico"
IDI_ICON3               ICON                    "MainSx.ico"
IDI_ICON4               ICON                    "MainFx.ico"
IDI_ICON5               ICON                    "MainGx.ico"

Code: [Select]
Controller.cpp

void __declspec(naked) iconHook()
{
//- Custom Client Ico (S8)
if (gProtect.m_MainInfo.CustomClientIconType == 1)
{
static DWORD dwIcon = (DWORD)LoadIcon(gController.Instance, MAKEINTRESOURCE(IDI_ICON2));

static DWORD dwJmp = 0x004D0E3C;

_asm
{
MOV EAX, dwIcon
JMP dwJmp
}
}

//- Custom Client Ico (EX)
if (gProtect.m_MainInfo.CustomClientIconType == 2)
{
static DWORD dwIcon = (DWORD)LoadIcon(gController.Instance, MAKEINTRESOURCE(IDI_ICON3));

static DWORD dwJmp = 0x004D0E3C;

_asm
{
MOV EAX, dwIcon
JMP dwJmp
}
}

//- Custom Client Ico (Mu Plasma)
if (gProtect.m_MainInfo.CustomClientIconType == 3)
{
static DWORD dwIcon = (DWORD)LoadIcon(gController.Instance, MAKEINTRESOURCE(IDI_ICON4));

static DWORD dwJmp = 0x004D0E3C;

_asm
{
MOV EAX, dwIcon
JMP dwJmp
}
}

//- Custom Client Ico (Mu Plasma)
if (gProtect.m_MainInfo.CustomClientIconType == 4)
{
static DWORD dwIcon = (DWORD)LoadIcon(gController.Instance, MAKEINTRESOURCE(IDI_ICON5));

static DWORD dwJmp = 0x004D0E3C;

_asm
{
MOV EAX, dwIcon
JMP dwJmp
}
}

//- Custom Client Ico (Classic)
else
{
static DWORD dwIcon = (DWORD)LoadIcon(gController.Instance, MAKEINTRESOURCE(IDI_ICON1));

static DWORD dwJmp = 0x004D0E3C;

_asm
{
MOV EAX, dwIcon
JMP dwJmp
}
}
}

Code: [Select]
MainInfo.ini

//====================================================================================
//-> Custom Client Icon Type
// 0 - Padrao
// 1 - MainEx
// 2 - MainSx
// 3 - MainFx
// 4 - MainGx
//====================================================================================
CustomClientIconType = 3

Code: [Select]
GetMainInfo.cpp

WORD CustomClientIconType;



info.CustomClientIconType = GetPrivateProfileInt("UPGRADE", "CustomClientIconType", 0, ".\\MainInfo.ini");

Code: [Select]
Potect.h
WORD CustomClientIconType;



Créditos

Emershow
BetellHost






Gracias:


Offline ziza #1 Posteado: August 05, 2022, 02:29:38 PM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 190
  • Gracias recibida: 1870
  • br
SHOW MEU PARCEIRO ISSO AI PRA CIMA DEUS ABENÇOE THANKSSS

Gracias:


Offline Djassar #2 Posteado: August 07, 2022, 05:56:39 PM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 142
  • Gracias recibida: 819
  • cn
What is Controller.cpp? I haven't it.


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
2 Replies
3503 Views
Last post September 10, 2019, 04:58:10 PM
by Yalc
27 Replies
7285 Views
Last post September 11, 2022, 05:40:13 PM
by Djassar
4 Replies
2274 Views
Last post June 16, 2020, 11:27:12 PM
by melo920
7 Replies
3522 Views
Last post February 09, 2022, 07:07:00 AM
by skinmuonline
43 Replies
4697 Views
Last post January 17, 2024, 05:17:35 AM
by NghienMU