Note : Custom Gloves Effects are not included in this released. I use a different Custom Effect System in S9, not time to release it now:P
So, missing visual effect is expected. You may need to code custom effects by yourself. Cheer!
DllMain Hook
HookThis((DWORD)&VicRFGloves_4, HOOK_RF_GLOVES_4);
HookThis((DWORD)&VicRFGloves_3, HOOK_RF_GLOVES_3);
HookThis((DWORD)&VicRFGloves_2, HOOK_RF_GLOVES_2);
HookThis((DWORD)&VicRFGloves_1, HOOK_RF_GLOVES_1);
CustomRFWeaponsFix
/-------------------------------------------
//Fix Added Custom RF Weapons
//By Vic
//-------------------------------------------
#define HOOK_RF_GLOVES_1 0x005999CA
#define JMPBACK_RF_GLOVES_1 0x005999D2
#define HOOK_RF_GLOVES_2 0x00521C96
#define JMPBACK_RF_GLOVES_2 0x00521C9C
#define HOOK_RF_GLOVES_3 0x00586BDA
#define JMPBACK_RF_GLOVES_3 0x00586BE0
#define HOOK_RF_GLOVES_4 0x00612D02
#define JMPBACK_RF_GLOVES_4 0x00612D08
#define CUSTOM_RF_WEAPONS_MAX 4
#define CUSTOM_RF_WEAPONS_LR_GAP 100
DWORD VIC_CUSTOM_RF_WEAPONS[CUSTOM_RF_WEAPONS_MAX] = { 46,52,53,56 };
DWORD VIC_CUSTOM_RF_WEAPONS_R[CUSTOM_RF_WEAPONS_MAX] = { 146,152,153,156 };
DWORD VIC_CUSTOM_RF_WEAPONS_L[CUSTOM_RF_WEAPONS_MAX] = { 246,252,253,256 };
BOOL VicIsCustomRFWeapons(DWORD idx)
{
if (idx > 1272)
idx -= 1272;
for (int i = 0; i < CUSTOM_RF_WEAPONS_MAX; i++)
if (VIC_CUSTOM_RF_WEAPONS == idx)
return TRUE;
return FALSE;
}
BOOL VicIsCustomRFWeapons2(DWORD idx)
{
if (idx > 1272)
idx -= 1272;
for (int i = 0; i < CUSTOM_RF_WEAPONS_MAX; i++)
if (VIC_CUSTOM_RF_WEAPONS_L == idx || VIC_CUSTOM_RF_WEAPONS_R == idx)
return TRUE;
return FALSE;
}
DWORD vRFTemp1;
void __declspec(naked) VicRFGloves_1()
{
_asm
{
mov eax, [ebp - 0x1C];
mov vRFTemp1, eax;
}
if (VicIsCustomRFWeapons(vRFTemp1))
{
_asm
{
mov edx, 0x005999DE;
jmp edx;
}
}
_asm
{
push[ebp - 0x1C];
mov ecx, 0x012767A0;
mov edx, JMPBACK_RF_GLOVES_1;
jmp edx;
}
}
void __declspec(naked) VicRFGloves_2(DWORD a1, DWORD mIdx, DWORD slot)
{
if (slot == 0 || slot == 1)
{
if (VicIsCustomRFWeapons(mIdx))
{
mIdx += CUSTOM_RF_WEAPONS_GAP*(slot+1);
}
}
_asm
{
push slot;
push mIdx;
mov edx, JMPBACK_RF_GLOVES_2;
jmp edx;
}
}
DWORD vRFTemp3;
void __declspec(naked) VicRFGloves_3()
{
_asm
{
mov vRFTemp3, eax;
}
if (VicIsCustomRFWeapons(vRFTemp3))
{
_asm
{
mov edx, 0x00586BEC;
jmp edx;
}
}
_asm
{
mov eax, [ebp - 0x00000348];
movsx eax, word ptr[eax];
push eax;
mov ecx, 0x012767A0;
mov edx, JMPBACK_RF_GLOVES_3;
jmp edx;
}
}
void __declspec(naked) VicRFGloves_4(DWORD a1, DWORD mIdx)
{
if (VicIsCustomRFWeapons2(mIdx))
{
_asm
{
mov edx, 0x00612D19;
jmp edx;
}
}
_asm
{
push mIdx;
push a1;
mov edx, JMPBACK_RF_GLOVES_4;
jmp edx;
}
}
Remember to add L/R RF Gloves bmd in item.bmd
Credits:
MeWZ