- Joined
- Feb 18, 2013
- Messages
- 1,123
- Reaction score
- 175
Well, not a challenge but... What happens if you add this code to your mod?
Take it as a challenge, manage to add it (1==1 my code) to your code-base and tell me what happened
[shcode=cpp]
DWORD dwRetMysteriousFunction = NULL;
void __declspec(naked) MysteriousFunction()
{
__asm mov edi, 520
__asm cmp edi, 538
__asm jmp [dwRetMysteriousFunction]
}
DWORD dwSAMP = MemHlp::GetModuleAddress("samp.dll");
if (dwSAMP && !dwRetMysteriousFunction)
{
MemHlp::RedirectJump((dwSAMP + 0xB1EA4), MysteriousFunction);
MemHlp::NOP((dwSAMP + 0xB1EA4 + 5), 1);
// to make it a bit easier, just midhook ((dwSAMP + 0xB1EA4)) (size: 6)
dwRetMysteriousFunction = (dwSAMP + 0xB1EAA);
}
[/shcode]
Implement this code to your DLL and run SA:MP and just spawn and look what changed.
Take it as a challenge, manage to add it (1==1 my code) to your code-base and tell me what happened
[shcode=cpp]
DWORD dwRetMysteriousFunction = NULL;
void __declspec(naked) MysteriousFunction()
{
__asm mov edi, 520
__asm cmp edi, 538
__asm jmp [dwRetMysteriousFunction]
}
DWORD dwSAMP = MemHlp::GetModuleAddress("samp.dll");
if (dwSAMP && !dwRetMysteriousFunction)
{
MemHlp::RedirectJump((dwSAMP + 0xB1EA4), MysteriousFunction);
MemHlp::NOP((dwSAMP + 0xB1EA4 + 5), 1);
// to make it a bit easier, just midhook ((dwSAMP + 0xB1EA4)) (size: 6)
dwRetMysteriousFunction = (dwSAMP + 0xB1EAA);
}
[/shcode]
Implement this code to your DLL and run SA:MP and just spawn and look what changed.