CLEO HELP Convert for 0.3.DL help ?

MalikeiraOPoder

Well-Known Member
Joined
Mar 16, 2019
Messages
85
Likes
2
Points
8
5
#1
Hi everyone, I made this simple cheat to use in version 0.3.DL, but I do not know how to convert to 0.3.DL, someone knows how to convert and can help me?


my code:

PHP:
{$CLEO .cs}
thread "easy cheat" 

:cheat
wait 0 
if 
   SAMP.Available
else_jump @cheat 
0B34: samp register_client_command ".repair" to_label @repair 
0B34: samp register_client_command ".ammo" to_label @ammo
0B34: samp register_client_command ".removegun" to_label @removegun
0B34: samp register_client_command ".removeall" to_label @removeall
0B34: samp register_client_command ".gun" to_label @gun  

:idk
wait 0 
jump @idk

:removeall
   SAMP.IsCommandTyped([email protected])
048F: actor $PLAYER_ACTOR remove_weapons 
SAMP.CmdRet

:removegun
   SAMP.IsCommandTyped([email protected])
0470: [email protected] = actor $PLAYER_ACTOR current_weapon 
0555: remove_weapon [email protected] from_actor $PLAYER_ACTOR 
SAMP.CmdRet

:ammo
   SAMP.IsCommandTyped([email protected])
if 
0AD4: [email protected] = scan_string [email protected] format "%d" [email protected]  
else_jump @error_1 
0470: [email protected] = actor $PLAYER_ACTOR current_weapon 
Actor.SetCarWeapon($PLAYER_ACTOR, [email protected], [email protected])
SAMP.CmdRet

:repair
   SAMP.IsCommandTyped([email protected])
if 
   Actor.Driving($PLAYER_ACTOR)
else_jump @error_2 
$car = Actor.CurrentCar($PLAYER_ACTOR)
0A30: repair_car $car 
053F: set_car $car tires_vulnerability 0 
Car.RemoveReferences($car)
SAMP.CmdRet

:gun
   SAMP.IsCommandTyped([email protected])
if 
0AD4: [email protected] = scan_string [email protected] format "%d %d" [email protected] [email protected]  
else_jump @error_3 
if and
   not [email protected] == 19 
   not [email protected] == 20 
   not [email protected] == 21 
   not [email protected] > 46 
  [email protected] >= 0 
else_jump @error_3 
0781: get_weapon_with_ID [email protected] model_to [email protected] 
Model.Load([email protected])
038B: load_requested_models               
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, [email protected], [email protected])
SAMP.CmdRet

:error_1
chatmsg "{ff0000}* Error: Enter a number" 0 
SAMP.CmdRet

:error_2
chatmsg "{ff0000}* Error: You have to be driving!" 0 
SAMP.CmdRet

:error_3
chatmsg "{ff0000}* Error: Type /.gun [ 0 to 46 ] [ Amount ]" 0 
SAMP.CmdRet
 

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
1,598
Likes
203
Points
78
Location
Lithuania
Website
ugbase.eu
15
#7

0x32789

Well-Known Member
Joined
May 26, 2014
Messages
849
Likes
29
Points
78
Location
LongForgotten <-> 0x32789
#11
If the russian website procedure is right to register client command without 0.3DL
then you need those offsets:
SAMP BASE,
SAMP_FUNC_ADDCLIENTCMD
and g_Input pointer/offset.

You can get all 3, they are in s0biet source too.
or 0.3DL btw
SAMP_CHAT_INPUT_INFO_OFFSET 0x2ACA14
SAMP_FUNC_ADDCLIENTCMD 0x691B0
base, you know how to do it or don't need it since the function already does it.

heres the updated func, this should work if I did it right.

Code:
:registerClientCommand // unsigned long dwSAMPHandle, char szCommandName[], CMDPROC CallBack
var
    [email protected]: integer
    [email protected]: integer
end

[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x2ACA14 // struct
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x691B0 // function

0AA6: call_method [email protected] struct [email protected] num_params 2 pop 0 [email protected] [email protected]
0AB2: ret 0
Ye, I confirmed the offsets and replaced with the correct ones for 0.3DL
 

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
1,598
Likes
203
Points
78
Location
Lithuania
Website
ugbase.eu
15
#12
If the russian website procedure is right to register client command without 0.3DL
then you need those offsets:
SAMP BASE,
SAMP_FUNC_ADDCLIENTCMD
and g_Input pointer/offset.

You can get all 3, they are in s0biet source too.
or 0.3DL btw
SAMP_CHAT_INPUT_INFO_OFFSET 0x2ACA14
SAMP_FUNC_ADDCLIENTCMD 0x691B0
base, you know how to do it or don't need it since the function already does it.

heres the updated func, this should work if I did it right.

Code:
:registerClientCommand // unsigned long dwSAMPHandle, char szCommandName[], CMDPROC CallBack
var
    [email protected]: integer
    [email protected]: integer
end

[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x2ACA14 // struct
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x691B0 // function

0AA6: call_method [email protected] struct [email protected] num_params 2 pop 0 [email protected] [email protected]
0AB2: ret 0
Ye, I confirmed the offsets and replaced with the correct ones for 0.3DL
But still need - Get last command params.
 

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
1,598
Likes
203
Points
78
Location
Lithuania
Website
ugbase.eu
15
#13
If the russian website procedure is right to register client command without 0.3DL
then you need those offsets:
SAMP BASE,
SAMP_FUNC_ADDCLIENTCMD
and g_Input pointer/offset.

You can get all 3, they are in s0biet source too.
or 0.3DL btw
SAMP_CHAT_INPUT_INFO_OFFSET 0x2ACA14
SAMP_FUNC_ADDCLIENTCMD 0x691B0
base, you know how to do it or don't need it since the function already does it.

heres the updated func, this should work if I did it right.

Code:
:registerClientCommand // unsigned long dwSAMPHandle, char szCommandName[], CMDPROC CallBack
var
    [email protected]: integer
    [email protected]: integer
end

[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x2ACA14 // struct
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x691B0 // function

0AA6: call_method [email protected] struct [email protected] num_params 2 pop 0 [email protected] [email protected]
0AB2: ret 0
Ye, I confirmed the offsets and replaced with the correct ones for 0.3DL
Tested and fully Working!

PHP:
{$cleo .cs}

0000:

const
SAMP_IS_READY = 1
end

repeat
wait 1000
0A8D: [email protected] = read_memory 0xA444A0 size 4 virtual_protect 0
until [email protected] == SAMP_IS_READY

if 8AA2: [email protected] = load_library "samp.dll" // IF and SET
then 0A93: end_custom_thread
end

0AC6: [email protected] = label @cmdname offset
0AB1: call_scm_func @registerClientParam 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

while true
    wait 0
    if [email protected] == 1
    then
        //wait 1000
        0AB1: @GetLastCommandParams 0 _returnCMDParams [email protected]
        0AD1: "%s" 2000 [email protected]  
        [email protected] = 0   
    else
        print "Disable" 1000
    end
end

:registerClientParam
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                           
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientCommand // unsigned long dwSAMPHandle, char szCommandName[], CMDPROC CallBack
0085: [email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x2ACA14 // struct || SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
0085: [email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x691B0 // function || SAMP_FUNC_ADDCLIENTCMD

0AA6: call_method [email protected] struct [email protected] num_params 2 pop 0 [email protected] [email protected]
0AB2: ret 0

:cmdname
hex
    "test" 0
end

:callback
hex
    83 35 11 11 11 11 01 // xor     [11111111], 01
    C3 // retn
end

:GetLastCommandParams
0AA2: [email protected] = load_library "samp.dll"
[email protected] += 0x17FBB8 // SAMP CHAT OR DIALOG INPUT TEXT OFFSET || return like "/cmd BigWorld"
0AB1: @SkipCMD 1 StringPointer [email protected] _Return [email protected] // skip cmd and get "BigWorld"
0AB2: 1 [email protected]

:SkipCMD
{
    0AB1: @SkipCMD 1 StringPointer [email protected] _Return [email protected]
}
0AB1: @strlen 1 string [email protected] _return [email protected]
[email protected] -= 1
for [email protected] = 0 to [email protected]
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1 
    if 
    [email protected] == 47 // 47 - /
    then
        [email protected]++
        0AB1: @strlen 1 string [email protected] _return [email protected]
        [email protected] -= 1
        for [email protected] = 0 to [email protected]
            0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
            if
            [email protected] == 32 // 32 - space
            then
                [email protected]++  
                0AB2: 1 [email protected] 
            end 
        [email protected]++
        end                                                     
    end    
[email protected]++
end
0AB2: 0 

:strlen
{
    Example: 0AB1: @strlen 1 string [email protected] return: [email protected]
    In: [email protected] - text;
    Out: [email protected] - size;
}
for [email protected] = 0 to 1024
    0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0
    if not [email protected] == 0
    jf break
    [email protected] += 1
end
0AB2: ret 1 [email protected]
 
Last edited:

0x32789

Well-Known Member
Joined
May 26, 2014
Messages
849
Likes
29
Points
78
Location
LongForgotten <-> 0x32789
#15

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
1,598
Likes
203
Points
78
Location
Lithuania
Website
ugbase.eu
15
#16
0AC7: [email protected] = var [email protected] offset
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1

pretty sure those are for params

for example change

0AC7: [email protected] = var [email protected] offset
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1

the [email protected] to [email protected]
and shit.

maybe you can do the strings. dunno
Can you check this one.:
https://blast.hk/threads/897/page-9#post-186148
 
OP
OP
MalikeiraOPoder

MalikeiraOPoder

Well-Known Member
Joined
Mar 16, 2019
Messages
85
Likes
2
Points
8
5
#18
You still need it?
Yes, pls


If the russian website procedure is right to register client command without 0.3DL
then you need those offsets:
SAMP BASE,
SAMP_FUNC_ADDCLIENTCMD
and g_Input pointer/offset.

You can get all 3, they are in s0biet source too.
or 0.3DL btw
SAMP_CHAT_INPUT_INFO_OFFSET 0x2ACA14
SAMP_FUNC_ADDCLIENTCMD 0x691B0
base, you know how to do it or don't need it since the function already does it.

heres the updated func, this should work if I did it right.

Code:
:registerClientCommand // unsigned long dwSAMPHandle, char szCommandName[], CMDPROC CallBack
var
    [email protected]: integer
    [email protected]: integer
end

[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x2ACA14 // struct
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
[email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x691B0 // function

0AA6: call_method [email protected] struct [email protected] num_params 2 pop 0 [email protected] [email protected]
0AB2: ret 0
Ye, I confirmed the offsets and replaced with the correct ones for 0.3DL

So hard for me, im beginner yet :( i didnt understand nothin
 

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
1,598
Likes
203
Points
78
Location
Lithuania
Website
ugbase.eu
15
#19
nEVER TESTED

PHP:
{$CLEO .cs}

0000:

wait 8500

if 8AA2: [email protected] = load_library "samp.dll" // IF and SET
then 0A93: end_custom_thread
end

0AC6: [email protected] = label @cmdname1 offset
0AB1: call_scm_func @registerClientParam1 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname2 offset
0AB1: call_scm_func @registerClientParam2 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname3 offset
0AB1: call_scm_func @registerClientParam3 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname4 offset
0AB1: call_scm_func @registerClientParam4 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname5 offset
0AB1: call_scm_func @registerClientParam5 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

while true
    wait 0

if [email protected] == 1 // gun
then 
    0AB1: @GetLastCommandParams 0 _returnCMDParams [email protected]   
    if 
    0AD4: $NOT_USED = scan_string [email protected] format "%d %d" [email protected] [email protected]  
    then
        if and
        not [email protected] == 19 
        not [email protected] == 20 
        not [email protected] == 21 
        not [email protected] > 46 
        [email protected] >= 0 
        then
            0781: get_weapon_with_ID [email protected] model_to [email protected] 
            Model.Load([email protected])
            038B: load_requested_models               
            Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, [email protected], [email protected])
            [email protected] = 0
        end
    else
        0AD1: "* Error: Type /.gun [ 0 to 46 ] [ Amount ]" 1337 
        [email protected] = 0
    end
end

if [email protected] == 1 // remove all
then
    048F: actor $PLAYER_ACTOR remove_weapons   
    [email protected] = 0   
end 

if [email protected] == 1 // remove gun
then
    0470: [email protected] = actor $PLAYER_ACTOR current_weapon 
    0555: remove_weapon [email protected] from_actor $PLAYER_ACTOR   
    [email protected] = 0   
end

if [email protected] == 1 // ammo
then
    0AB1: @GetLastCommandParams 0 _returnCMDParams [email protected] 
    if 
    0AD4: $NOT_USED = scan_string [email protected] format "%d" [email protected]  
    then
        0470: [email protected] = actor $PLAYER_ACTOR current_weapon 
        Actor.SetCarWeapon($PLAYER_ACTOR, [email protected], [email protected])   
        [email protected] = 0
    else
        0AD1: "* Error: Enter a number" 1337 
        [email protected] = 0  
    end 
end

if [email protected] == 1 // repair
then
    if 
    Actor.Driving($PLAYER_ACTOR)
    then
        [email protected] = Actor.CurrentCar($PLAYER_ACTOR)
        0A30: repair_car [email protected]
        053F: set_car [email protected] tires_vulnerability 0 
        Car.RemoveReferences([email protected])
        [email protected] = 0
    else
        0AD1: "* Error: You have to be driving!" 1337 
        [email protected] = 0   
    end 
end

end

:registerClientParam1
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                           
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam2
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                           
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam3
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                           
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam4
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                           
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam5
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                           
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientCommand // unsigned long dwSAMPHandle, char szCommandName[], CMDPROC CallBack
0085: [email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x2ACA14 // struct || SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
0085: [email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x691B0 // function || SAMP_FUNC_ADDCLIENTCMD

0AA6: call_method [email protected] struct [email protected] num_params 2 pop 0 [email protected] [email protected]
0AB2: ret 0

:cmdname1
hex
    ".gun" 0
end

:cmdname2
hex
    ".removeall" 0
end

:cmdname3
hex
    ".removegun" 0
end

:cmdname4
hex
    ".ammo" 0
end

:cmdname5
hex
    ".repair" 0
end

:callback
hex
    83 35 11 11 11 11 01 // xor     [11111111], 01
    C3 // retn
end

:GetLastCommandParams
0AA2: [email protected] = load_library "samp.dll"
[email protected] += 0x17FBB8 // SAMP CHAT OR DIALOG INPUT TEXT OFFSET || return like "/cmd BigWorld"
0AB1: @SkipCMD 1 StringPointer [email protected] _Return [email protected] // skip cmd and get "BigWorld"
0AB2: 1 [email protected]

:SkipCMD
{
    0AB1: @SkipCMD 1 StringPointer [email protected] _Return [email protected]
}
0AB1: @strlen 1 string [email protected] _return [email protected]
[email protected] -= 1
for [email protected] = 0 to [email protected]
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1 
    if 
    [email protected] == 47 // 47 - /
    then
        [email protected]++
        0AB1: @strlen 1 string [email protected] _return [email protected]
        [email protected] -= 1
        for [email protected] = 0 to [email protected]
            0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
            if
            [email protected] == 32 // 32 - space
            then
                [email protected]++  
                0AB2: 1 [email protected] 
            end 
        [email protected]++
        end                                                     
    end    
[email protected]++
end
0AB2: 0 

:strlen
{
    Example: 0AB1: @strlen 1 string [email protected] return: [email protected]
    In: [email protected] - text;
    Out: [email protected] - size;
}
for [email protected] = 0 to 1024
    0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0
    if not [email protected] == 0
    jf break
    [email protected] += 1
end
 
OP
OP
MalikeiraOPoder

MalikeiraOPoder

Well-Known Member
Joined
Mar 16, 2019
Messages
85
Likes
2
Points
8
5
#20
nEVER TESTED

PHP:
{$CLEO .cs}

0000:

wait 8500

if 8AA2: [email protected] = load_library "samp.dll" // IF and SET
then 0A93: end_custom_thread
end

0AC6: [email protected] = label @cmdname1 offset
0AB1: call_scm_func @registerClientParam1 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname2 offset
0AB1: call_scm_func @registerClientParam2 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname3 offset
0AB1: call_scm_func @registerClientParam3 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname4 offset
0AB1: call_scm_func @registerClientParam4 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

0AC6: [email protected] = label @cmdname5 offset
0AB1: call_scm_func @registerClientParam5 0 _Return: CallBack [email protected]
0AB1: call_scm_func @registerClientCommand 3 dwSAMPHandle: [email protected] szCommandName: [email protected] CallBack: [email protected]

while true
    wait 0

if [email protected] == 1 // gun
then
    0AB1: @GetLastCommandParams 0 _returnCMDParams [email protected]  
    if
    0AD4: $NOT_USED = scan_string [email protected] format "%d %d" [email protected] [email protected] 
    then
        if and
        not [email protected] == 19
        not [email protected] == 20
        not [email protected] == 21
        not [email protected] > 46
        [email protected] >= 0
        then
            0781: get_weapon_with_ID [email protected] model_to [email protected]
            Model.Load([email protected])
            038B: load_requested_models              
            Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, [email protected], [email protected])
            [email protected] = 0
        end
    else
        0AD1: "* Error: Type /.gun [ 0 to 46 ] [ Amount ]" 1337
        [email protected] = 0
    end
end

if [email protected] == 1 // remove all
then
    048F: actor $PLAYER_ACTOR remove_weapons  
    [email protected] = 0  
end

if [email protected] == 1 // remove gun
then
    0470: [email protected] = actor $PLAYER_ACTOR current_weapon
    0555: remove_weapon [email protected] from_actor $PLAYER_ACTOR  
    [email protected] = 0  
end

if [email protected] == 1 // ammo
then
    0AB1: @GetLastCommandParams 0 _returnCMDParams [email protected]
    if
    0AD4: $NOT_USED = scan_string [email protected] format "%d" [email protected] 
    then
        0470: [email protected] = actor $PLAYER_ACTOR current_weapon
        Actor.SetCarWeapon($PLAYER_ACTOR, [email protected], [email protected])  
        [email protected] = 0
    else
        0AD1: "* Error: Enter a number" 1337
        [email protected] = 0 
    end
end

if [email protected] == 1 // repair
then
    if
    Actor.Driving($PLAYER_ACTOR)
    then
        [email protected] = Actor.CurrentCar($PLAYER_ACTOR)
        0A30: repair_car [email protected]
        053F: set_car [email protected] tires_vulnerability 0
        Car.RemoveReferences([email protected])
        [email protected] = 0
    else
        0AD1: "* Error: You have to be driving!" 1337
        [email protected] = 0  
    end
end

end

:registerClientParam1
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                          
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam2
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                          
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam3
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                          
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam4
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                          
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientParam5
0AC6: [email protected] = label @callback offset

// write [email protected] address to assembly code
[email protected] += 2
0AC7: [email protected] = var [email protected] offset                          
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
[email protected] -= 2
[email protected] = 0 // zeroing 31 var
0AB2: ret 1 [email protected]

:registerClientCommand // unsigned long dwSAMPHandle, char szCommandName[], CMDPROC CallBack
0085: [email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x2ACA14 // struct || SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
0085: [email protected] = [email protected] // dwSAMPHandle
[email protected] += 0x691B0 // function || SAMP_FUNC_ADDCLIENTCMD

0AA6: call_method [email protected] struct [email protected] num_params 2 pop 0 [email protected] [email protected]
0AB2: ret 0

:cmdname1
hex
    ".gun" 0
end

:cmdname2
hex
    ".removeall" 0
end

:cmdname3
hex
    ".removegun" 0
end

:cmdname4
hex
    ".ammo" 0
end

:cmdname5
hex
    ".repair" 0
end

:callback
hex
    83 35 11 11 11 11 01 // xor     [11111111], 01
    C3 // retn
end

:GetLastCommandParams
0AA2: [email protected] = load_library "samp.dll"
[email protected] += 0x17FBB8 // SAMP CHAT OR DIALOG INPUT TEXT OFFSET || return like "/cmd BigWorld"
0AB1: @SkipCMD 1 StringPointer [email protected] _Return [email protected] // skip cmd and get "BigWorld"
0AB2: 1 [email protected]

:SkipCMD
{
    0AB1: @SkipCMD 1 StringPointer [email protected] _Return [email protected]
}
0AB1: @strlen 1 string [email protected] _return [email protected]
[email protected] -= 1
for [email protected] = 0 to [email protected]
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
    if
    [email protected] == 47 // 47 - /
    then
        [email protected]++
        0AB1: @strlen 1 string [email protected] _return [email protected]
        [email protected] -= 1
        for [email protected] = 0 to [email protected]
            0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
            if
            [email protected] == 32 // 32 - space
            then
                [email protected]++ 
                0AB2: 1 [email protected]
            end
        [email protected]++
        end                                                    
    end   
[email protected]++
end
0AB2: 0

:strlen
{
    Example: 0AB1: @strlen 1 string [email protected] return: [email protected]
    In: [email protected] - text;
    Out: [email protected] - size;
}
for [email protected] = 0 to 1024
    0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0
    if not [email protected] == 0
    jf break
    [email protected] += 1
end
is not working :(
 
Top