[CLEO] Some snippets

Status
Not open for further replies.

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Method to check Attached object and get its Handle

0.3.7 R1
PHP:
:isAttachedObjectExist
{
    0.3.7 - R1
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3CD // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
    005A: 31@ += 0@  // (int)
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF 31@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

:GetAttachedObjectHandle
{
    0.3.7 - R1
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3CD // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x27C // SAMP_OBJECT_STURCT_OFFSET
    005A: 31@ += 0@  // (int)
    0A8D: 30@ readMem 31@ sz 1 vp 0
    IF 30@ > 0
    THEN 
        0485:  return_true
        0A8D: 31@ readMem 31@ sz 4 vp 0
        31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
        0A8D: 31@ readMem 31@ sz 4 vp 0
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 31@

0.3.7 R2
PHP:
:isAttachedObjectExist
{
    0.3.7 - R2
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3C5 // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
    005A: 31@ += 0@  // (int)
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF 31@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

:GetAttachedObjectHandle
{
    0.3.7 - R2
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3C5 // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x27C // SAMP_OBJECT_STURCT_OFFSET
    005A: 31@ += 0@  // (int)
    0A8D: 30@ readMem 31@ sz 1 vp 0
    IF 30@ > 0
    THEN 
        0485:  return_true
        0A8D: 31@ readMem 31@ sz 4 vp 0
        31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
        0A8D: 31@ readMem 31@ sz 4 vp 0
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 31@

0.3.7 R3
PHP:
:isAttachedObjectExist
{
    0.3.7 - R3
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
    005A: 31@ += 0@  // (int)
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF 31@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

:GetAttachedObjectHandle
{
    0.3.7 - R3
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x27C // SAMP_OBJECT_STURCT_OFFSET
    005A: 31@ += 0@  // (int)
    0A8D: 30@ readMem 31@ sz 1 vp 0
    IF 30@ > 0
    THEN 
        0485:  return_true
        0A8D: 31@ readMem 31@ sz 4 vp 0
        31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
        0A8D: 31@ readMem 31@ sz 4 vp 0
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 31@

0.3.7 R4 v1
PHP:
:isAttachedObjectExist
{
    0.3.7 R4 v1
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x104 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
    005A: 31@ += 0@  // (int)
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF 31@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

:GetAttachedObjectHandle
{
    0.3.7 R4 v1
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x104 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x27C // SAMP_OBJECT_STURCT_OFFSET
    005A: 31@ += 0@  // (int)
    0A8D: 30@ readMem 31@ sz 1 vp 0
    IF 30@ > 0
    THEN 
        0485:  return_true
        0A8D: 31@ readMem 31@ sz 4 vp 0
        31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
        0A8D: 31@ readMem 31@ sz 4 vp 0
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 31@

0.3.7 R4 v2
PHP:
:isAttachedObjectExist
{
    0.3.7 R4 v2
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x104 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
    005A: 31@ += 0@  // (int)
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF 31@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

:GetAttachedObjectHandle
{
    0.3.7 R4 v2
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x104 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x27C // SAMP_OBJECT_STURCT_OFFSET
    005A: 31@ += 0@  // (int)
    0A8D: 30@ readMem 31@ sz 1 vp 0
    IF 30@ > 0
    THEN 
        0485:  return_true
        0A8D: 31@ readMem 31@ sz 4 vp 0
        31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
        0A8D: 31@ readMem 31@ sz 4 vp 0
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 31@

0.3.7 R5
PHP:
:isAttachedObjectExist
{
    0.3.7 - R5
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26EB94 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x104 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
    005A: 31@ += 0@  // (int)
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF 31@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

:GetAttachedObjectHandle
{
    0.3.7 - R5
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x26EB94 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x104 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x27C // SAMP_OBJECT_STURCT_OFFSET
    005A: 31@ += 0@  // (int)
    0A8D: 30@ readMem 31@ sz 1 vp 0
    IF 30@ > 0
    THEN 
        0485:  return_true
        0A8D: 31@ readMem 31@ sz 4 vp 0
        31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
        0A8D: 31@ readMem 31@ sz 4 vp 0
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 31@

0.3.DL
PHP:
:isAttachedObjectExist
{
    0.3.DL
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @isAttachedObjectExist 1 ID: 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x4C // SAMP_ATTACHED_OBJECT_EXIST
    005A: 31@ += 0@  // (int)
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF 31@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

:GetAttachedObjectHandle
{
    0.3.DL
    MAX ATTACHED OBJECTS = 10
    IF 0AB1: @GetAttachedObjectHandle 1 ID: 0@ _Returned: Handle 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 31@ = readmem 31@ sz 4 vp 0
    31@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x0 // SAMP_ACTOR_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0@ *= 4
    0@ += 0x27C // SAMP_OBJECT_STURCT_OFFSET
    005A: 31@ += 0@  // (int)
    0A8D: 30@ readMem 31@ sz 1 vp 0
    IF 30@ > 0
    THEN 
        0485:  return_true
        0A8D: 31@ readMem 31@ sz 4 vp 0
        31@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET 
        0A8D: 31@ readMem 31@ sz 4 vp 0
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 31@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Code return:
Weapon ID you were damaged with


PHP:
:SAMPGetLocalPlayerDamageType
{
    0.3.7 R1
    0AB1: @SAMPGetLocalPlayerDamageType 0 _Returned: DamageType 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3CD // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0 // SAMP_UNKNOW_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    1@ += 0x40 // SAMP_LOCAL_PLAYER_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x760 // SAMP_LOCAL_PLAYER_DAMAGE_TYPE_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF NOT 1@ == 255 // NOT DAMAGED
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@
PHP:
:SAMPGetLocalPlayerDamageType
{
    0.3.7 R2
    0AB1: @SAMPGetLocalPlayerDamageType 0 _Returned: DamageType 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3C5 // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0 // SAMP_UNKNOW_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    1@ += 0x40 // SAMP_LOCAL_PLAYER_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x760 // SAMP_LOCAL_PLAYER_DAMAGE_TYPE_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF NOT 1@ == 255 // NOT DAMAGED
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@
PHP:
:SAMPGetLocalPlayerDamageType
{
    0.3.7 R3
    0AB1: @SAMPGetLocalPlayerDamageType 0 _Returned: DamageType 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0 // SAMP_UNKNOW_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    1@ += 0x40 // SAMP_LOCAL_PLAYER_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x760 // SAMP_LOCAL_PLAYER_DAMAGE_TYPE_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF NOT 1@ == 255 // NOT DAMAGED
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@
PHP:
:SAMPGetLocalPlayerDamageType
{
    0.3.7 R4-1
    0AB1: @SAMPGetLocalPlayerDamageType 0 _Returned: DamageType 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x104 // SAMP_UNKNOW_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    1@ += 0x40 // SAMP_LOCAL_PLAYER_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x760 // SAMP_LOCAL_PLAYER_DAMAGE_TYPE_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF NOT 1@ == 255 // NOT DAMAGED
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@
PHP:
:SAMPGetLocalPlayerDamageType
{
    0.3.7 R4-2
    0AB1: @SAMPGetLocalPlayerDamageType 0 _Returned: DamageType 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x104 // SAMP_UNKNOW_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    1@ += 0x40 // SAMP_LOCAL_PLAYER_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x760 // SAMP_LOCAL_PLAYER_DAMAGE_TYPE_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF NOT 1@ == 255 // NOT DAMAGED
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@
PHP:
:SAMPGetLocalPlayerDamageType
{
    0.3.7  R5
    0AB1: @SAMPGetLocalPlayerDamageType 0 _Returned: DamageType 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x26EB94 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x104 // SAMP_UNKNOW_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    1@ += 0x40 // SAMP_LOCAL_PLAYER_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x760 // SAMP_LOCAL_PLAYER_DAMAGE_TYPE_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF NOT 1@ == 255 // NOT DAMAGED
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@
PHP:
:SAMPGetLocalPlayerDamageType
{
    0.3.DL
    0AB1: @SAMPGetLocalPlayerDamageType 0 _Returned: DamageType 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0 // SAMP_UNKNOW_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    1@ += 0x40 // SAMP_LOCAL_PLAYER_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x760 // SAMP_LOCAL_PLAYER_DAMAGE_TYPE_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF NOT 1@ == 255 // NOT DAMAGED
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@

Weapon IDs:

  1. WeaponSlot.type
  2. (Slot0: No Weapon) (Slot2: Handguns)
  3. 0 - Fist 22 - Pistol
  4. 1 - Brass Knuckles 23 - Silenced Pistol
  5. (Slot1: Melee) 24 - Desert Eagle
  6. 2 - Golf Club (Slot3: Shotguns)
  7. 3 - Nitestick 25 - Shotgun
  8. 4 - Knife 26 - Sawn-Off Shotgun
  9. 5 - Baseball Bat 27 - SPAS-12
  10. 6 - Shovel (Slot4: Sub-Machineguns)
  11. 7 - Pool Cue 28 - Micro Uzi
  12. 8 - Katana 29 - MP5
  13. 9 - Chainsaw 32 - TEC-9
  14. 15 - Cane
  15. (Slot5: Machineguns) (Slot10: Gifts)
  16. 30 - AK47 14 - Flowers
  17. 31 - M4 (Slot9:Special1)
  18. (Slot6: Rifles) 42 - Fire Extinguisher
  19. 33 - Country Rifle 43 - Camera
  20. 34 - Sniper Rifle (Slot11:Special2)
  21. (Slot7: Heavy Weapons) 44 - NV Goggles
  22. 35 - Rocket Launcher 45 - IR Goggles
  23. 36 - Heat Seaking RPG 46 - Parachute
  24. 37 - Flame Thrower (Slot12: Detonators)
  25. 38 - Minigun 40 - Detonator(for remote explosives)
  26. (Slot8: Projectiles)
  27. 16 - Grenade
  28. 18 - Molotov Cocktail
  29. 39 - Remote Explosives
  30. (No slot: Fired from hunter / hydra / missile launcher)
  31. (This type is stored in the rocket pool as rocket type, but is the continuation of this list)
  32. 19 - Normal rockets
  33. 20 - Heatseeking rockets
  34. 58 - Flares
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Check if Windows is minimized or not
PHP:
:isWindowMinimized
{
    0AB1: @isWindowMinimized 0
}
0A8D: 31@ = read_memory 0xC97C1C size 4 virtual_protect 0 // window handle pointer
0A8D: 30@ = read_memory 0x85825C size 4 virtual_protect 0 // IsIconic call function pointer
0AA7: call_function 30@ num_params 1 pop 0 WindowHandle 31@ _Returned: State 29@
IF 29@ > 0
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 1 29@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Two Functions:
1. Get current vehicle ID.
2. Get current vehicle number plate.
PHP:
:SAMPGetCurrentVehicleID
{
    0.3.DL
    0AB1: @SAMPGetCurrentVehicleID 0 _Returned: VehicleID 0@
}
IF 0AA2: 31@ = "samp.dll"
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@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ -= 0x14 // SAMP_CURRENT_VEHICLE_ID_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    IF AND
    NOT 31@ == 65535
    31@ >= 0
    00DF:   actor $PLAYER_ACTOR in_car
    THEN 0AB2: ret 1 31@
    END
END
0AB2: ret 0
PHP:
:SAMPGetCurrentVehicleNumberPlate
{
    0.3.DL
    0AB1: @SAMPGetCurrentVehicleNumberPlate 0 _Returned: NumberPlate 0@
}
IF 0AA2: 31@ = "samp.dll"
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@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0085: 29@ = 31@ // COPY MEMORY
    29@ -= 0x14 // SAMP_CURRENT_VEHICLE_ID_OFFSET
    0A8D: 29@ readMem 29@ sz 4 vp 0
    IF AND
    NOT 29@ == 65535
    29@ >= 0
    00DF:   actor $PLAYER_ACTOR in_car
    THEN
        29@ *= 0x4 // VEHICLE_ID * 0x4
        29@ += 0x1134
        005A: 31@ += 29@
        0A8D: 31@ = readMem 31@ sz 4 vp 0
        31@ += 0x93 // SAMP_VEHICLE_NUMBER_PLATE_OFFSET
        0A8D: 30@ = readMem 31@ sz 1 vp 0
        IF 30@ > 0
        THEN 0485:  return_true
        ELSE
            059A:  return_false
            31@ = 0
        END
    END
END
0AB2: ret 1 31@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
For those who using Gta Go To AI for walking to checkpoint.
Snippet below will be usefull.

PHP:
:GetPlayerActorGoToTaskID
// 0AB1: @GetPlayerActorGoToTaskID 0 _Returned: TaskStatus 0@
0A8D: 31@ = read_memory 0xC0B1FC size 2 virtual_protect 0 // Read to Get Task ID
IF NOT 31@ == 65535
THEN 0AB2: ret 1 31@
END
0AB2: ret 1 0
PHP:
:GetPlayerActorGoToTaskStatus
// 0AB1: @GetPlayerActorGoToTaskStatus 0 _Returned: TaskStatus 0@
0A8D: 31@ = read_memory 0xC0B1FC size 2 virtual_protect 0 // Read to Get Task ID
062E: get_actor $PLAYER_ACTOR task 31@ status_store_to 30@ // ret 7 if not found
IF NOT 30@ == 7
THEN 0AB2: ret 1 30@
ELSE 0AB2: ret 1 0
END
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
** I Present Advanced GUI's For GTA AND SAMP **
Snippets Design to make GUI's For your own Cheats.., All you need is your imagination!

~ NOTE ~:
Each Drawing snippet must have different ID when called, do not use same IDs for multiple calls otherwise settings will be overwritten!
Make sure you have 03F0: enable_text_draw 1 at beginning of you entire code.


~ NOTE:
Post gradually will be update with more snippets for GUI's

PHP:
:DrawCheckBox
{
    0AB1: @DrawCheckBox 14 ID 4 Type 1 XY 320.0 100.0 SizeXY 50.0 50.0 BackgroundRGBA 255 0 0 255 CheckedMarkRGBA 0 0 0 255
    Max ID - 999
    Total Types - 3
    Types ID from 0 to 2
}
IF 0@ > -1
THEN
    0AC8: 30@ = allocate_memory_size 144
    0AD3: 30@ = format "cleo\TextdrawSettings.ini" // File
    IF 0AAB:   file_exists 30@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-CheckBox" 0@ // Section
        0AC8: 28@ = allocate_memory_size 144
        0AD3: 28@ = format "ID:%d-PositionX" 0@ // Key
        0AC8: 27@ = allocate_memory_size 144
        0AD3: 27@ = format "ID:%d-PositionY" 0@ // Key
        0AB1: @get_float_from_ini_file 3 File 30@ section 29@ key 28@ _Returned: NumOfChars 26@ Float 24@
        0AB1: @get_float_from_ini_file 3 File 30@ section 29@ key 27@ _Returned: NumOfChars 25@ Float 23@
        IF AND // IF ANY FLOAT EXIST AT SECTION
        26@ > 0
        25@ > 0
        THEN
            IF OR
            8045:   24@ == 2@  // (float)
            8045:   23@ == 3@  // (float)
            THEN // UPDATE IF POSITION CHANGED
                0AB1: @Write_float_to_ini_file 4 Float 2@ File 30@ Section 29@ Key 28@
                0AB1: @Write_float_to_ini_file 4 Float 3@ File 30@ Section 29@ Key 27@
            END
            0AC8: 26@ = allocate_memory_size 144
            0AD3: 26@ = format "ID:%d-State" 0@ // Key
            0AB1: @get_int_from_ini_file 3 File 30@ section 29@ key 26@ _Returned: NumOfChars 25@ Int 22@
            IF 25@ > 0 // IF ANY INT EXIST AT SECTION
            THEN
                IF 0AB1: @is_cursor_inside_square 4 XY 2@ 3@ size 4@ 5@
                THEN
                    IF 0AB0: 1 // IF LEFT MOUSE PRESSED
                    THEN
                        REPEAT
                        WAIT 0
                        UNTIL 8AB0: 1 // NOT LEFT MOUSE PRESSED
                        IF 22@ == 0 // CheckBox State
                        THEN
                            0AB1: @write_int_to_ini_file 4 Int 1 File 30@ Section 29@ Key 26@
                        END
                        IF 22@ == 1 // CheckBox State
                        THEN
                            0AB1: @write_int_to_ini_file 4 Int 0 File 30@ Section 29@ Key 26@
                        END
                    END
                END
                IF 1@ == 0 // type 1
                THEN
                    IF 22@ == 0 // CheckBox not Checked
                    THEN
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 6@ 7@ 8@ 9@ // draw main CheckBox
                    END
                    IF 22@ == 1 // CheckBox Checked
                    THEN // Calculate and draw checkedbox checked
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 6@ 7@ 8@ 9@ // draw main CheckBox
                        4@ -= 1.0
                        5@ -= 1.0
                        03F0: enable_text_draw 1
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 10@ 11@ 12@ 13@ // draw Checked CheckBox
                    END
                END
                IF 1@ == 1 // type 2
                THEN
                    IF 22@ == 0 // CheckBox not Checked
                    THEN
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 6@ 7@ 8@ 9@ // draw main CheckBox
                    END
                    IF 22@ == 1 // CheckBox Checked
                    THEN // Calculate and draw checkedbox checked
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 6@ 7@ 8@ 9@ // draw main CheckBox
                        4@ /= 1.5
                        5@ /= 4.0
                        03F0: enable_text_draw 1
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 10@ 11@ 12@ 13@ // draw Checked CheckBox
                    END
                END
                IF 1@ == 2 // type 3
                THEN
                    IF 22@ == 0 // CheckBox not Checked
                    THEN
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 6@ 7@ 8@ 9@ // draw main CheckBox
                    END
                    IF 22@ == 1 // CheckBox Checked
                    THEN // Calculate and draw checkedbox checked
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 6@ 7@ 8@ 9@ // draw main CheckBox
                        5@ /= 4.0
                        03F0: enable_text_draw 1
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 10@ 11@ 12@ 13@ // draw Checked CheckBox
                        5@ *= 4.0
                        4@ /= 4.0
                        038E: draw_box_position 24@ 23@ size 4@ 5@ RGBA 10@ 11@ 12@ 13@ // draw Checked CheckBox
                    END
                END
            ELSE
                0AB1: @write_int_to_ini_file 4 Int 0 File 30@ Section 29@ Key 26@
            END
            0AA3: free_dynamic_library 26@
        ELSE
            0AB1: @Write_float_to_ini_file 4 Float 2@ File 30@ Section 29@ Key 28@
            0AB1: @Write_float_to_ini_file 4 Float 3@ File 30@ Section 29@ Key 27@
        END // End Of 26@ > 0 & 25@ > 0
        0AA3: free_dynamic_library 29@
        0AA3: free_dynamic_library 28@
        0AA3: free_dynamic_library 27@
    ELSE
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-CheckBox" 0@ // Section
        0AC8: 28@ = allocate_memory_size 144
        0AD3: 28@ = format "ID:%d-PositionX" 0@ // Key
        0AC8: 27@ = allocate_memory_size 144
        0AD3: 27@ = format "ID:%d-PositionY" 0@ // Key
        0AB1: @Write_float_to_ini_file 4 Float 2@ File 30@ Section 29@ Key 28@
        0AB1: @Write_float_to_ini_file 4 Float 3@ File 30@ Section 29@ Key 27@
        0AA3: free_dynamic_library 29@
        0AA3: free_dynamic_library 28@
        0AA3: free_dynamic_library 27@
    END // End Of 0AAB:   file_exists 30@
    0AA3: free_dynamic_library 30@
END
0AB2: ret 0
PHP:
:SetCheckBoxState
{
    0AB1: @SetCheckBoxState 2 ID 1 State 1
}
IF 0@ > -1
THEN
    0AC8: 30@ = allocate_memory_size 144
    0AD3: 30@ = format "cleo\TextdrawSettings.ini" // File
    IF 0AAB:   file_exists 30@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-CheckBox" 0@ // Section
        0AC8: 28@ = allocate_memory_size 144
        0AD3: 28@ = format "ID:%d-State" 0@ // Key
        0AB1: @write_int_to_ini_file 4 Int 1@ File 30@ Section 29@ Key 28@
        0AA3: free_dynamic_library 29@
        0AA3: free_dynamic_library 28@
    END
    0AA3: free_dynamic_library 30@
END
0AB2: ret 0
PHP:
:GetCheckBoxState
{
    0AB1: @GetCheckBoxState 1 ID 1 _Returned: State 0@
}
IF 0@ > -1
THEN
    0AC8: 30@ = allocate_memory_size 144
    0AD3: 30@ = format "cleo\TextdrawSettings.ini" // File
    IF 0AAB:   file_exists 30@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-CheckBox" 0@ // Section
        0AC8: 28@ = allocate_memory_size 144
        0AD3: 28@ = format "ID:%d-State" 0@ // Key
        0AB1: @get_int_from_ini_file 3 File 30@ section 29@ key 28@ _Returned: NumOfChars 27@ Int 26@
        IF 27@ > 0 // IF ANY INT EXIST AT SECTION
        THEN 0AB2: ret 1 26@
        END
        0AA3: free_dynamic_library 29@
        0AA3: free_dynamic_library 28@
    END
    0AA3: free_dynamic_library 30@
END
0AB2: ret 0
PHP:
:GetCheckBoxPosition
{
    0AB1: @GetCheckBoxPosition 1 ID 1 _Returned: XY 0@ 1@
}
IF 0@ > -1
THEN
    0AC8: 30@ = allocate_memory_size 144
    0AD3: 30@ = format "cleo\TextdrawSettings.ini" // File
    IF 0AAB:   file_exists 30@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-CheckBox" 0@ // Section
        0AC8: 28@ = allocate_memory_size 144
        0AD3: 28@ = format "ID:%d-PositionX" 0@ // Key
        0AC8: 27@ = allocate_memory_size 144
        0AD3: 27@ = format "ID:%d-PositionY" 0@ // Key
        0AB1: @get_float_from_ini_file 3 File 30@ section 29@ key 28@ _Returned: NumOfChars 26@ Float 24@
        0AB1: @get_float_from_ini_file 3 File 30@ section 29@ key 27@ _Returned: NumOfChars 25@ Float 23@
        IF AND // IF ANY FLOAT EXIST AT SECTION
        26@ > 0
        25@ > 0
        THEN 0AB2: ret 2 24@ 23@
        END
        0AA3: free_dynamic_library 29@
        0AA3: free_dynamic_library 28@
        0AA3: free_dynamic_library 27@
    END
    0AA3: free_dynamic_library 30@
END
0AB2: ret 0
PHP:
:DrawText
{
    0AC8: 0@ = allocate_memory_size 144
    0AD3: 0@ = format "Hello World!"
    0AB1: @DrawText 19 ID 1 Text 0@ XY 320.0 100.0 AdjustWidth 0.205 AdjustHeight 0.955 Font 0 TextCentered 1 Proportional 1 TextBehindTextures 0 TextRGBA 204 102 51 255 TextOutline 1 OutlineRGBA 10 10 10 255
    0AC9: free_allocated_memory 0@
    Max ID - 999
}
IF AND
0@ >= 0
0@ < 10
THEN 0AD3: 31@v = format "CRED00%d" 0@
END
IF AND
0@ >= 10
0@ < 100
THEN 0AD3: 31@v = format "CRED0%d" 0@
END
IF AND
0@ >= 100
0@ < 1000
THEN 0AD3: 31@v = format "CRED%d" 0@
END
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 GxtName 31@v _Returned: GxtNameAdress 30@
0AA5: call 0x718600 2 pop 2 GxtNameAddress 30@ Text 1@
0349: set_text_draw_font 6@
0342: set_text_draw_centered 7@
0348: enable_text_draw_proportional 8@
03E0: draw_text_behind_textures 9@
0340: set_text_draw_RGBA 10@ 11@ 12@ 13@
033F: set_text_draw_letter_size width 4@ height 5@
081C: draw_text_outline 14@ RGBA 15@ 16@ 17@ 18@
// Adjust PositionX based on string length
0AB1: @StrlenA 1 String 1@ _Returned: Length 29@
29@ /= 2 // Divide length
0093: 29@ = integer 29@ to_float
0063: 2@ -= 29@  // (float) PositionX - divided length
033E: set_draw_text_position 2@ 3@ GXT 31@v
0AB2: ret 0
PHP:
:DrawTextWithNumber
{
    0AC8: 0@ = allocate_memory_size 144
    0AD3: 0@ = format "> Twist is number ~1~!"
    0AB1: @DrawTextWithNumber 20 ID 2 Text 0@ Number 15 XY 320.0 100.0 AdjustWidth 0.205  AdjustHeight 0.955 Font 1 TextCentered 1 Proportional 1 TextBehindTextures 0 TextRGBA 204 102 51 255 TextOutline 1 RGBA 10 10 10 255
    0AC9: free_allocated_memory 0@
    Max ID - 999
}
IF AND
0@ >= 0
0@ < 10
THEN 0AD3: 31@v = format "CRED00%d" 0@
END
IF AND
0@ >= 10
0@ < 100
THEN 0AD3: 31@v = format "CRED0%d" 0@
END
IF AND
0@ >= 100
0@ < 1000
THEN 0AD3: 31@v = format "CRED%d" 0@
END
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 GxtName 31@v _Returned: GxtNameAdress 30@
0AA5: call 0x718600 2 pop 2 GxtNameAddress 30@ Text 1@
0349: set_text_draw_font 7@
0342: set_text_draw_centered 8@
0348: enable_text_draw_proportional 9@
03E0: draw_text_behind_textures 10@
0340: set_text_draw_RGBA 11@ 12@ 13@ 14@
033F: set_text_draw_letter_size width 5@ height 6@
081C: draw_text_outline 15@ RGBA 16@ 17@ 18@ 19@
// Adjust PositionX based on string length
0AB1: @StrlenA 1 String 1@ _Returned: Length 29@
29@ /= 2 // Divide length
0093: 29@ = integer 29@ to_float
0063: 3@ -= 29@  // (float) PositionX - divided length
045A: draw_text_1number 3@ 4@ GXT 31@v number 2@
0AB2: ret 0
PHP:
:DrawHorizontalSlider
{
    0AB1: @DrawHorizontalSlider 22 ID 28 Type 1 SliderXY 455.0 188.0 SliderSize 60.0 2.0 Cursorsize 4.0 4.0 StartingValue 150.0 MaxValue 300.0 BackroundRGBA 0 0 0 255 SliderRGBA 255 255 255 255 CursorRGBA 0 191 255 255
    Max ID - 999
    Total Types - 2
    Types ID from 0 to 1
}
IF 0@ > -1
THEN
    0AC8: 31@ = allocate_memory_size 144
    0AD3: 31@ = format "cleo\TextdrawSettings.ini" // File
    IF 0AAB:   file_exists 31@
    THEN
        0AC8: 30@ = allocate_memory_size 144
        0AD3: 30@ = format "ID:%d-HorizontalSlider" 0@ // Section
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-PositionX" 0@ // Key
        0AB1: @get_float_from_ini_file 3 File 31@ section 30@ key 29@ _Returned: NumOfChars 28@ Float 27@
        0AC9: free_allocated_memory 29@
 
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-PositionY" 0@ // Key
        0AB1: @get_float_from_ini_file 3 File 31@ section 30@ key 29@ _Returned: NumOfChars 26@ Float 25@
        0AC9: free_allocated_memory 29@
 
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-StartingValue" 0@ // Key
        0AB1: @get_float_from_ini_file 3 File 31@ section 30@ key 29@ _Returned: NumOfChars 24@ Float 23@
        0AC9: free_allocated_memory 29@
        IF AND
        28@ > 0
        26@ > 0
        24@ > 0
        THEN
            IF OR
            8045:   27@ == 2@  // (float)
            8045:   25@ == 3@  // (float)
            THEN // UPDATE IF POSITION CHANGED
                0AC8: 31@ = allocate_memory_size 144
                0AD3: 31@ = format "cleo\TextdrawSettings.ini" // File
                0AC8: 30@ = allocate_memory_size 144
                0AD3: 30@ = format "ID:%d-HorizontalSlider" 0@ // Section
                0AC8: 29@ = allocate_memory_size 144
                0AD3: 29@ = format "ID:%d-PositionX" 0@ // Key
                0AB1: @Write_float_to_ini_file 4 Float 2@ File 31@ Section 30@ Key 29@
                0AC9: free_allocated_memory 29@
                0AC8: 29@ = allocate_memory_size 144
                0AD3: 29@ = format "ID:%d-PositionY" 0@ // Key
                0AB1: @Write_float_to_ini_file 4 Float 3@ File 31@ Section 30@ Key 29@
                0AC9: free_allocated_memory 29@
                0AC9: free_allocated_memory 30@
                0AC9: free_allocated_memory 31@
            END
            0087: 8@ = 23@ // (float) copy StartingValue from ini file
            0AB1: @GetCursorPosOfFullScreenXY 0 _Returned: XY 31@ 30@
            // Calculate the initial cursor position
            0087: 27@ = 4@ // (float) copy SliderSizeX
            27@ /= 2.0 // Divided SliderSizeX
            0087: 29@ = 8@ // (float) copy StartingValue
            0087: 28@ = 2@ // (float) copy SliderX
            0073: 29@ /= 9@ // (float) StartingValue /= MaxValue
            006B: 29@ *= 4@  // (float) SliderSizeX
            005B: 28@ += 29@  // (float) SliderX += SliderSizeX
            0063: 28@ -= 27@ // (float) SliderX -= Divided SliderSizeX
            // Ensure cursor position is within slider bounds
            0087: 26@ = 2@ // (float) copy SliderX
            0087: 25@ = 2@ // (float) copy SliderX
            005B: 26@ += 27@  // (float) SliderX + Divided SliderSizeX
            0063: 25@ -= 27@  // (float) SliderX - Divided SliderSizeX
            IF 0025:   28@ > 26@  // (float)
            THEN 0087: 28@ = 26@
            END
            IF 8025:   28@ < 25@  // (float)
            THEN 0087: 28@ = 25@
            END
            IF 1@ == 0 // Type 1
            THEN
                // Draw the slider background
                4@ += 1.0
                5@ += 1.0
                038E: draw_box_position 2@ 3@ sizeXY 4@ 5@ RGBA 10@ 11@ 12@ 13@
                4@ -= 1.0
                5@ -= 1.0
                038E: draw_box_position 2@ 3@ sizeXY 4@ 5@ RGBA 14@ 15@ 16@ 17@
                // Draw the cursor
                6@ += 1.0
                7@ += 1.0
                038E: draw_box_position 28@ 3@ sizeXY 6@ 7@ RGBA 10@ 11@ 12@ 13@
                6@ -= 1.0
                7@ -= 1.0
                038E: draw_box_position 28@ 3@ sizeXY 6@ 7@ RGBA 18@ 19@ 20@ 21@
            END
            IF 1@ == 1 // Type 2
            THEN
                // Draw the slider background
                4@ += 1.0
                5@ += 1.0
                038E: draw_box_position 2@ 3@ sizeXY 4@ 5@ RGBA 10@ 11@ 12@ 13@
                4@ -= 1.0
                5@ -= 1.0
                038E: draw_box_position 2@ 3@ sizeXY 4@ 5@ RGBA 14@ 15@ 16@ 17@
                // Draw the cursor
                6@ += 1.0
                7@ += 1.0
                038E: draw_box_position 28@ 3@ sizeXY 6@ 7@ RGBA 10@ 11@ 12@ 13@
                6@ -= 1.0
                7@ -= 1.0
                038E: draw_box_positionXY 28@ 3@ sizeXY 6@ 7@ RGBA 18@ 19@ 20@ 21@
                0087: 29@ = 2@ // Copy SliderX
                0087: 26@ = 4@ // Copy SliderSizeX
                0087: 23@ = 28@ // Copy CursorX
                26@ /= 2.0
                0063: 29@ -= 26@ // Slider Start X
                0087: 28@ = 29@ // Copy Start
                0063: 23@ -= 29@ // width left
                0087: 25@ = 23@ // copy width left
                25@ /= 2.0
                005B: 28@ += 25@ // slider left X
                038E: draw_box_position 28@ 3@ sizeXY 23@ 5@ RGBA 18@ 19@ 20@ 21@
            END
            4@ += 2.0
            5@ += 2.0
            IF 0AB1: @is_cursor_inside_square 4 XY 2@ 3@ size 4@ 5@
            THEN
                4@ -= 2.0
                5@ -= 2.0
                IF 0AB0: 1 // Check if left mouse button is pressed
                THEN
                    // Calculate new slider value based on mouse position
                    0063: 2@ -= 27@ // SliderX -= Divided SliderSizeX
                    0063: 31@ -= 2@ // MouseX -= SliderX
                    0073: 31@ /= 4@ // MouseX -= SliderSizeX
                    006B: 31@ *= 9@ // MouseX -= MaxValue
                    0087: 8@ = 31@ // StartingValue = MouseX
                    // Ensure slider value is within the valid range
                    IF 0025: 8@ > 9@ // StartingValue > MaxValue
                    THEN 0087: 8@ = 9@ // StartingValue = MaxValue
                    END
                    IF 8@ < 0.0 // StartingValue < 0.0
                    THEN 8@ = 0.0 // StartingValue = 0.0
                    END
                    //printf "%f" time 1000 8@
                    0AC8: 31@ = allocate_memory_size 144
                    0AD3: 31@ = format "cleo\TextdrawSettings.ini" // File
                    0AC8: 30@ = allocate_memory_size 144
                    0AD3: 30@ = format "ID:%d-HorizontalSlider" 0@ // Section
                    0AC8: 29@ = allocate_memory_size 144
                    0AD3: 29@ = format "ID:%d-StartingValue" 0@ // Key
                    0AB1: @write_float_to_ini_file 4 Float 8@ File 31@ Section 30@ Key 29@
                    0AA3: free_dynamic_library 29@
                    0AA3: free_dynamic_library 30@
                    0AA3: free_dynamic_library 31@
                END
            END
            //0AD1: "%f" 1337 8@
    
        ELSE
            0AC8: 30@ = allocate_memory_size 144
            0AD3: 30@ = format "ID:%d-HorizontalSlider" 0@ // Section
            0AC8: 29@ = allocate_memory_size 144
            0AD3: 29@ = format "ID:%d-PositionX" 0@ // Key
            0AB1: @write_float_to_ini_file 4 Float 2@ File 31@ Section 30@ Key 29@
            0AA3: free_dynamic_library 29@
            0AC8: 29@ = allocate_memory_size 144
            0AD3: 29@ = format "ID:%d-PositionY" 0@ // Key
            0AB1: @write_float_to_ini_file 4 Float 3@ File 31@ Section 30@ Key 29@
            0AA3: free_dynamic_library 29@
            0AC8: 29@ = allocate_memory_size 144
            0AD3: 29@ = format "ID:%d-StartingValue" 0@ // Key
            0AB1: @write_float_to_ini_file 4 Float 8@ File 31@ Section 30@ Key 29@
            0AA3: free_dynamic_library 29@
            0AA3: free_dynamic_library 30@
        END
        0AA3: free_dynamic_library 30@
    ELSE
        0AC8: 30@ = allocate_memory_size 144
        0AD3: 30@ = format "ID:%d-HorizontalSlider" 0@ // Section
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-PositionX" 0@ // Key
        0AB1: @write_float_to_ini_file 4 Float 2@ File 31@ Section 30@ Key 29@
        0AA3: free_dynamic_library 29@
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-PositionY" 0@ // Key
        0AB1: @write_float_to_ini_file 4 Float 3@ File 31@ Section 30@ Key 29@
        0AA3: free_dynamic_library 29@
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-StartingValue" 0@ // Key
        0AB1: @write_float_to_ini_file 4 Float 8@ File 31@ Section 30@ Key 29@
        0AA3: free_dynamic_library 29@
        0AA3: free_dynamic_library 30@
    END
    0AA3: free_dynamic_library 31@
END
0AB2: ret 0
PHP:
:GetHorizontalSliderValue
{
    0AB1: @GetHorizontalSliderValue 1 ID 1 _Returned: Value 0@
}
IF 0@ > -1
THEN
    0AC8: 30@ = allocate_memory_size 144
    0AD3: 30@ = format "cleo\TextdrawSettings.ini" // File
    IF 0AAB:   file_exists 30@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "ID:%d-HorizontalSlider" 0@ // Section
        0AC8: 28@ = allocate_memory_size 144
        0AD3: 28@ = format "ID:%d-StartingValue" 0@ // Key
        0AB1: @get_float_from_ini_file 3 File 30@ section 29@ key 28@ _Returned: NumOfChars 26@ Float 24@
        IF 26@ > 0 // IF ANY FLOAT EXIST AT SECTION
        THEN 0AB2: ret 1 24@
        END
        0AA3: free_dynamic_library 29@
        0AA3: free_dynamic_library 28@
    END
    0AA3: free_dynamic_library 30@
END
0AB2: ret 0
PHP:
:StrlenA
// 0AB1: @StrlenA 1 String 0@ _Returned: Length 1@
0A8D: 26@ = readmem 0x8580DC sz 4 vp 0 // 0x8580DC - KERNEL32.lstrlenA
0AA7: strlen_addr 26@ num_params 1 pop 0 string 0@ _returned_length 25@
0AB2: ret 1 25@
PHP:
:is_cursor_inside_square
// 0AB1: @is_cursor_inside_square 4 XY 400.0 300.0 size 120.0 25.0
0087: 29@ = 0@ // (float) Copy PositionX = targetPosX
0087: 28@ = 0@ // (float) Copy PositionX = targetPosX
0087: 27@ = 1@ // (float) Copy PositionY = targetPosY
0087: 26@ = 1@ // (float) Copy PositionY = targetPosY
0087: 25@ = 2@ // (float) Copy SizeX = targetSizeX
0087: 24@ = 3@ // (float) Copy SizeY = targetSizeY
25@ /= 2.0 // halfSizeX
24@ /= 2.0 // halfSizeY
0063: 29@ -= 25@  // (float) leftBoundary = targetPosX - halfSizeX
005B: 28@ += 25@  // (float) rightBoundary = targetPosX + halfSizeX
0063: 27@ -= 24@  // (float) topBoundary = targetPosY - halfSizeY
005B: 26@ += 24@  // (float) bottomBoundary = targetPosY + halfSizeY
0AB1: @GetCursorPosOfFullScreenXY 0 _Returned: XY 31@ 30@
IF AND
0035: 31@ >= 29@ // mouseX >= leftBoundary
8035: 31@ <= 28@ // mouseX <= rightBoundary
0035: 30@ >= 27@ // mouseY >= topBoundary
8035: 30@ <= 26@ // mouseY <= bottomBoundary
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: ret 0
PHP:
:get_float_from_ini_file
{
    0AC8: 0@ = allocate_memory_size 144
    0AD3: 0@ = format "cleo\Autologin.ini"
    0AC8: 1@ = allocate_memory_size 144
    0AD3: 1@ = format "Server1"
    0AC8: 2@ = allocate_memory_size 144
    0AD3: 2@ = format "Health"
    0AB1: @get_float_from_ini_file 3 File 0@ section 1@ key 2@ _Returned: NumOfChars 3@ Float 4@
 
    // Do something...
 
    0AA3: free_dynamic_library 0@
    0AA3: free_dynamic_library 1@
    0AA3: free_dynamic_library 2@
}
IF 0AA2: 31@ = load_dynamic_library "Kernel32.dll"
THEN
    IF 0AA4: 30@ = get_dynamic_library_procedure "GetPrivateProfileStringA" library 31@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AA7: call_function 30@ num_params 6 pop 0 File 0@ Size 144 ReturnedString 29@ Default 0 Key 2@ Section 1@ _Returned: CopiedNumOfChars 28@
        IF 28@ > 0
        THEN
            IF 0AD4: $NOT_USED = scan_string 29@ format "%f" 29@
            THEN 0AB2: cleo_return 2 28@ 29@
            END
        ELSE 0AB2: cleo_return 2 28@ 0.0
        END
        0AC9: free_allocated_memory 29@
    END
    0AA3: free_dynamic_library 31@
END
0AB2: cleo_return 0
PHP:
:get_int_from_ini_file
{
    0AC8: 0@ = allocate_memory_size 144
    0AD3: 0@ = format "cleo\Autologin.ini"
    0AC8: 1@ = allocate_memory_size 144
    0AD3: 1@ = format "Server1"
    0AC8: 2@ = allocate_memory_size 144
    0AD3: 2@ = format "Health"
    0AB1: @get_int_from_ini_file 3 File 0@ section 1@ key 2@ _Returned: NumOfChars 3@ Int 4@
 
    // Do something...
 
    0AA3: free_dynamic_library 0@
    0AA3: free_dynamic_library 1@
    0AA3: free_dynamic_library 2@
}
IF 0AA2: 31@ = load_dynamic_library "Kernel32.dll"
THEN
    IF 0AA4: 30@ = get_dynamic_library_procedure "GetPrivateProfileStringA" library 31@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AA7: call_function 30@ num_params 6 pop 0 File 0@ Size 144 ReturnedString 29@ Default 0 Key 2@ Section 1@ _Returned: CopiedNumOfChars 28@
        IF 28@ > 0
        THEN
            IF 0AD4: $NOT_USED = scan_string 29@ format "%d" 29@
            THEN 0AB2: cleo_return 2 28@ 29@
            END
        ELSE
            0AB2: cleo_return 2 28@ 0
        END
        0AC9: free_allocated_memory 29@
    END
    0AA3: free_dynamic_library 31@
END
0AB2: cleo_return 0
PHP:
:write_float_to_ini_file
{
    0AC8: 0@ = allocate_memory_size 144
    0AD3: 0@ = format "cleo\Autologin.ini"
    0AC8: 1@ = allocate_memory_size 144
    0AD3: 1@ = format "Server1"
    0AC8: 2@ = allocate_memory_size 144
    0AD3: 2@ = format "Health"
    0AB1: @write_float_to_ini_file 4 Float 50.0 File 0@ Section 1@ Key 2@
    0AA3: free_dynamic_library 0@
    0AA3: free_dynamic_library 1@
    0AA3: free_dynamic_library 2@
}
IF 0AA2: 31@ = load_dynamic_library "Kernel32.dll"
THEN
    IF 0AA4: 30@ = get_dynamic_library_procedure "WritePrivateProfileStringA" library 31@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "%f" 0@
        0AA7: call_function 30@ num_params 4 pop 0 File 1@ Float 29@ Key 3@ Section 2@ _Returned: CopiedNumOfChars 28@
        0AA3: free_dynamic_library 29@
    END
    0AA3: free_dynamic_library 31@
END
0AB2: cleo_return 0
PHP:
:write_int_to_ini_file
{
    0AC8: 0@ = allocate_memory_size 144
    0AD3: 0@ = format "cleo\Autologin.ini"
    0AC8: 1@ = allocate_memory_size 144
    0AD3: 1@ = format "Server1"
    0AC8: 2@ = allocate_memory_size 144
    0AD3: 2@ = format "Health"
    0AB1: @write_int_to_ini_file 4 Int 50.0 File 30@ Section 29@ Key 28@
    0AA3: free_dynamic_library 0@
    0AA3: free_dynamic_library 1@
    0AA3: free_dynamic_library 2@
}
IF 0AA2: 31@ = load_dynamic_library "Kernel32.dll"
THEN
    IF 0AA4: 30@ = get_dynamic_library_procedure "WritePrivateProfileStringA" library 31@
    THEN
        0AC8: 29@ = allocate_memory_size 144
        0AD3: 29@ = format "%d" 0@
        0AA7: call_function 30@ num_params 4 pop 0 File 1@ Int 29@ Key 3@ Section 2@ _Returned: CopiedNumOfChars 28@
        0AA3: free_dynamic_library 29@
    END
    0AA3: free_dynamic_library 31@
END
0AB2: cleo_return 0
PHP:
:GetCursorPosOfFullScreenXY
// 0AB1: @GetCursorPosOfFullScreenXY 0 _Returned: 31@ 30@
IF 0AA2: 31@ = load_library "user32.dll"
THEN
    0AA4: 30@ = get_proc_address "GetCursorPos" library 31@
    0AC7: 28@ = var 29@ offset
    0AA5: call 30@ num_params 1 pop 0 28@
    0A8D: 27@ = read_memory 28@ size 4 virtual_protect 0
    28@ += 4
    0A8D: 26@ = read_memory 28@ size 4 virtual_protect 0
 
    25@ = 640.0 // screen X
    0A8D: 23@ = read_memory 0xC17044 size 4 virtual_protect 0 // full screen X
    0093: 23@ = integer 23@ to_float
    0073: 25@ /= 23@
    006B: 27@ *= 25@
    24@ = 448.0 // screen Y
    0A8D: 22@ = read_memory 0xC17048 size 4 virtual_protect 0 // full screen Y
    0093: 22@ = integer 22@ to_float
    0073: 24@ /= 22@
    006B: 26@ *= 24@
    0093: 27@ = integer 27@ to_float
    0093: 26@ = integer 26@ to_float
END
0AB2: ret 2 27@ 26@
 

Attachments

  • sa-mp-332.png
    sa-mp-332.png
    31.2 KB · Views: 64
  • sa-mp-332.png
    sa-mp-332.png
    12.9 KB · Views: 56
  • sa-mp-332.png
    sa-mp-332.png
    57.2 KB · Views: 49
  • sa-mp-332.png
    sa-mp-332.png
    83.5 KB · Views: 58
  • ssss.png
    ssss.png
    19.3 KB · Views: 17
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
For those who like making private code for specific player nick names...,
This code is made for you....


Example for nick names in github by editing main READ ME.md:
PHP:
# Premium-Members

Lukas_Parazitas

Admin_Admin

Alphatester_Tester

Big_Bussiness

Small_Businesss

NOTE:
Code require SAMPFUNCS.asi, but also can be made similar code without SAMPFUNCS.asi
PHP:
:GetAccessFile
{
    0AB1: @GetAccessFile 0
}
IF 8AAB:   not_file_exists "CLEO\UserAccess.txt"
THEN
    0AC6: 31@ = label @DownlaodFromAdress offset
    0AC6: 30@ = label @DownloadTo offset
    0C65: 29@ = download_url 31@ to_file 30@                                   
    REPEAT
    WAIT 0                                     
    0C66: 28@ = get_download 29@ state
    UNTIL 28@ <> -1                
    0C7D: release_download 29@
END
0AB2: ret 0

:DownlaodFromAdress
HEX
    "https://github.com/Parazitas17833/Premium-Members\0"
END
:DownloadTo
HEX
    "cleo\\UserAccess.txt\0"
END

:ReadUserAcessFileAndSendChatMessage
{
    0AB1: @ReadUserAcessFileAndSendChatMessage 0
}
IF 0AAB:   file_exists "CLEO\UserAccess.txt"
THEN                                   
    IF 0A9A: 31@ = openfile "cleo\UserAccess.txt" mode "rb"
    THEN
        IF 0AD5: file 31@ seek 227000 from_origin 1 // Set seek user nick names
        THEN
            0AC8: 30@ = allocate_memory_size 100000
            0AC8: 29@ = allocate_memory_size 260
            0B2B: samp 28@ = get_player_id_by_actor_handle $PLAYER_ACTOR
            0B36: samp 28@ = get_player_nickname 28@
            0AD3: 29@ = format "<p dir=%cauto%c>%s</p>" 0x22 0x22 28@
            REPEAT
            WAIT 100
                                  
                IF 0AD7: read_string_from_file 31@ to 30@ size 10000
                THEN
                    IF 0C29: $NOT_USED = stristr string1 30@ string2 29@
                    THEN
                        0085: 27@ = 28@ // (int)
                    END
                    IF 0C29: $NOT_USED = stristr string1 30@ string2 "</article></div></div></div></div></div>"
                    THEN
                        0AD5: file 31@ seek 0 from_origin 2 // Set seek end of file
                    END
                END
      
            UNTIL 0AD6:   end_of_file 31@ reached
            0A9B: closefile 31@
            0AC9: free_allocated_memory 30@
            0AC9: free_allocated_memory 29@
            IF 8C29: $NOT_USED = stristr string1 28@ string2 27@ // IF Nick Name wasn't found in github data base
            THEN
                chatmsg "{00ff78}[Cheat Code]: {7a9383}Sorry, but you don't have access to this mod because you don't own the premium version." -1
                chatmsg "{00ff78}[Cheat Code]: {7a9383}Please upgrade to benefit for all available features." -1
                0B00: delete_file "cleo\UserAccess.txt"  // IF and SET
                0A93: end_custom_thread // kill cleo
            ELSE // IF Nick Name was found in github data base
                chatmsg "{00ff78}[Cheat Code]: {7a9383}Mod by {0000FF}Creator {7a9383}for {00ff78}Magical Code {7a9383}has loaded." -1
               0B00: delete_file "cleo\UserAccess.txt"  // IF and SET
            END
        END
    END
END
0AB2: ret 0
 
Last edited:
Status
Not open for further replies.
Top