[CHALLENGE?] Add this code...

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
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 :D
[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.
 

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
NarutoUA said:
It creates Hydra instead of other vehicles?

Screenshot would have been nice, but yes it replaces every vehicle created with the model id 520(hydra).
 

NarutoUA

Member
Joined
May 26, 2013
Messages
20
Reaction score
1
0x688 said:
NarutoUA said:
It creates Hydra instead of other vehicles?

Screenshot would have been nice, but yes it replaces every vehicle created with the model id 520(hydra).

I didnt test it ingame, just looked in IDA.
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Pretty good function just shows that there is some good stuff people can still use to make a cool mod.
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
zin said:
Pretty good function just shows that there is some good stuff people can still use to make a cool mod.

gn4ONma.jpg
 
Top