CLEO Help Fast Reload.

CLEO related
Status
Not open for further replies.

DuKeBOMBA

Member
Joined
Jul 21, 2018
Messages
15
Reaction score
0
Hello, I want to make this way with on off, by ordering /reload to activate and also by /reload to disable and show me the message in the chat when I activate it and when I disable it. How he is now activated.
{$CLEO}

0000:

repeat
wait 0
until 0AFA:

const
CPED = 0xB6F5F0
TYPE_1 = 0x5FC {SHOTGUNS}
TYPE_2 = 0x618 {MP5/UZI/TEC9 etc}
TYPE_3 = 0x5E0 {PISTOLS}
TYPE_4 = 0x634 {M4/AK47 etc}
end

while true
wait 0
if and
0AB0: key_pressed 1
8AB0: key_pressed 0
then
0470: 0@ = actor $PLAYER_ACTOR current_weapon

{TYPE_1}
if or
0@ == 26
0@ == 27
then
0A8D: 1@ = read_memory CPED size 4 virtual_protect 0
1@ += TYPE_1
if
0@ == 26
then
0A8C: write_memory 1@ size 4 value 4 virtual_protect 0
wait 100 ms
else
0A8C: write_memory 1@ size 4 value 7 virtual_protect 0
wait 100 ms
end
end

{TYPE_2}
if or
0@ == 28
0@ == 29
0@ == 32
then
0A8D: 1@ = read_memory CPED size 4 virtual_protect 0
1@ += TYPE_2
if
0@ == 28
then
0A8C: write_memory 1@ size 4 value 100 virtual_protect 0
wait 100 ms
else
if
0@ == 29
then
0A8C: write_memory 1@ size 4 value 30 virtual_protect 0
wait 100 ms
else
0A8C: write_memory 1@ size 4 value 100 virtual_protect 0
wait 100 ms
end
end
 

Attachments

  • fast-reload.cs
    20.5 KB · Views: 11

Valiuks

Active member
Joined
Sep 9, 2018
Messages
25
Reaction score
4
put this before main
Code:
0B34: samp register_client_command "reload" to_label @onoff
30@ = 1

add one statement
Code:
    if and
        0AB0:   key_pressed 1
        8AB0:   key_pressed 0
        30@ == 1


put this in the bottom after main
Code:
:onoff
wait 0
0B12: 30@ = 30@ XOR 1
if
30@ == 1
then
0AF8: "{FF1493}Script{3eff00}On" color 16250516
else
0AF8: "{FF1493}Script{ff0000}Off" color 16250516
end
SAMP.CmdRet()
 
Status
Not open for further replies.
Top