PHP:
:SAMPGetObjectHandleByID
{
0AB1: @SAMPGetObjectHandleByID 1 ObjectID 1249 _Returned: Handle 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 17@
IF 17@ > 0
THEN
IF 17@ == 1 // 0.3.7 R1
THEN
31@ += 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x3CD // SAMP_PPOOLS_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x4 // SAMP_PPOOL_OBJECT_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
0@ *= 0x4 // OBJECT_ID * 0x4
0@ += 0xFA4 // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
005A: 31@ += 0@
0A8D: 30@ = readMem 31@ sz 4 vp 0
END
IF 17@ == 2 // 0.3.7 R2
THEN
31@ += 0x21A100 // SAMP_INFO_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x3C5 // SAMP_PPOOLS_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
0@ *= 0x4 // OBJECT_ID * 0x4
0@ += 0xFA4 // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
005A: 31@ += 0@
0A8D: 30@ = readMem 31@ sz 4 vp 0
END
IF 17@ == 3 // 0.3.DL
THEN
31@ += 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
0@ *= 0x4 // OBJECT_ID * 0x4
0@ += 0xFA4 // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
005A: 31@ += 0@
0A8D: 30@ = readMem 31@ sz 4 vp 0
END
IF 17@ == 4 // 0.3.7 R3
THEN
31@ += 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
0@ *= 0x4 // OBJECT_ID * 0x4
0@ += 0xFA4 // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
005A: 31@ += 0@
0A8D: 30@ = readMem 31@ sz 4 vp 0
END
IF 17@ == 5 // 0.3.7 R4
THEN
31@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
0@ *= 0x4 // OBJECT_ID * 0x4
0@ += 0xFA4 // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
005A: 31@ += 0@
0A8D: 30@ = readMem 31@ sz 4 vp 0
END
IF 17@ == 6 // 0.3.7 R4 - v2
THEN
31@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0xC // SAMP_PPOOL_OBJECT_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
0@ *= 0x4 // OBJECT_ID * 0x4
0@ += 0xFA4 // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
005A: 31@ += 0@
0A8D: 30@ = readMem 31@ sz 4 vp 0
END
IF 17@ == 7 // 0.3.7 R5
THEN
31@ += 0x26EB94 // SAMP_INFO_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
31@ += 0xC // SAMP_PPOOL_OBJECT_OFFSET
0A8D: 31@ readMem 31@ sz 4 vp 0
0@ *= 0x4 // OBJECT_ID * 0x4
0@ += 0xFA4 // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
005A: 31@ += 0@
0A8D: 30@ = readMem 31@ sz 4 vp 0
END
IF 30@ > 0
THEN
30@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
IF 30@ > 0
THEN
0485: return_true
0AB2: ret 1 30@
ELSE 059A: return_false
END
ELSE 059A: return_false
END
END
END
0AB2: 0