CLEO Help [Request] Can someone modify that script for me?

CLEO related
Status
Not open for further replies.

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
The .cs file in attachement types in "/capturf" after a specified chat appears. All I want to change is to make it say "/capturf" and after it and as fast as possible "/capture" I tried to use sannybuilder to add "say "/capture"" after the "/captuf" thingy but the cleo started crashing my game. When I remove what I added it works just fine. Any other things needn't to be changed. Can someone help me out?
 

Attachments

  • AutoCapturf.cs
    18.8 KB · Views: 29

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
Good luck ...
If want activate or deactivate write command /cap

PHP:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd

 
while true
wait 0
end
 
:in_rpc                   
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
     
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message 
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000 
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Parazitas said:
Good luck ...
If want activate or deactivate write command /cap

PHP:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd

 
while true
wait 0
end
 
:in_rpc                   
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
     
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message 
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000 
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:

First of all, Thanks. One question, Does it say "/capture" too. I can't see it at the source code ;D
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
TheyCallMe said:
Parazitas said:
Good luck ...
If want activate or deactivate write command /cap

PHP:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd

 
while true
wait 0
end
 
:in_rpc                   
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
     
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message 
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000 
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:

First of all, Thanks. One question, Does it say "/capture" too. I can't see it at the source code ;D

What you mean?
I read you code and edited. 
If you want something else first explane ....
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Parazitas said:
TheyCallMe said:
Parazitas said:
Good luck ...
If want activate or deactivate write command /cap

PHP:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd

 
while true
wait 0
end
 
:in_rpc                   
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
     
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message 
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000 
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:

First of all, Thanks. One question, Does it say "/capture" too. I can't see it at the source code ;D

What you mean?
I read you code and edited. 
If you want something else first explane ....

Sorry if you didn't understand me. I want it to say "/capturf" and just after that to say "/capture". As fast as possible. Thanks in advance.
 

Mila.cs ✅

Well-known member
Joined
Jun 24, 2016
Messages
247
Reaction score
10
Location
̀́̀́
TheyCallMe said:
Sorry if you didn't understand me. I want it to say "/capturf" and just after that to say "/capture". As fast as possible. Thanks in advance.

Code:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd

 
while true
wait 0
end
 
:in_rpc                   
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
     
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message 
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
        say "/capture" // all i did :p 
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000 
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:
 

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
TheyCallMe said:
I tried it and it's crashing my game. What's going on?

it works fine for me both of them SAMP 0.3.7 r1 sampfuncs 5.3.3 cleo 4.3 

[attachment=5314] [attachment=5315]

https://s18.postimg.org/hcpvt7u2h/sa-mp-037.png


Squirtle said:
nvm im dumb

you are not dumb just dont give up so easy like most people do here how to convert it into cleo

1. some scripts require this so download this http://ugbase.eu/attachment.php?aid=4662 from thread http://ugbase.eu/Thread-ASI-SAMPFUNCS-5-3-0-3-7 

2. after download open that rar archive go to folder SB data and all from that folder put into https://s18.postimg.org/7tksdfj2h/asd.jpg and replace if it asks you 

3. https://s18.postimg.org/6ej7ospq1/Screenshot_1.jpg compile&done :urtheman:
 

Attachments

  • cap Mila.cs.cs
    18.7 KB · Views: 22
  • cap Parazitas.cs
    18.7 KB · Views: 26

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
I changed the "/capturf" to "/capture" because it's the right command using sannybuilder without editing anything else. It's crashing my game even when I am using Anticrasher? Am I missing something?
 

Mila.cs ✅

Well-known member
Joined
Jun 24, 2016
Messages
247
Reaction score
10
Location
̀́̀́
TheyCallMe said:
I changed the "/capturf" to "/capture" because it's the right command using sannybuilder without editing anything else. It's crashing my game even when I am using Anticrasher? Am I missing something?

Sampfuncs?
http://ugbase.eu/attachment.php?aid=4661
 

Audioli

Active member
Joined
May 20, 2015
Messages
58
Reaction score
0
so you searched and came into the original thread where i asked for auto cap cleo and is the one that you're using? little snake
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Mila.cs ✅ said:
TheyCallMe said:
I changed the "/capturf" to "/capture" because it's the right command using sannybuilder without editing anything else. It's crashing my game even when I am using Anticrasher? Am I missing something?

Sampfuncs?
http://ugbase.eu/attachment.php?aid=4661

I have sampfuncs. When I leave it as "/capturf" it works perfectly when i replace "/capturf" with "/capture" and it crashes.

Audioli said:
so you searched and came into the original thread where i asked for auto cap cleo and is the one that you're using? little snake

I am a snake. I admit it ;(


Still any ideas. it keeps crashing should I download SB plugins if yes. Where to paste them?
 

Mila.cs ✅

Well-known member
Joined
Jun 24, 2016
Messages
247
Reaction score
10
Location
̀́̀́
TheyCallMe said:
Bring
up
my
post
;)

Code:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd


while true
wait 0
end

:in_rpc                  
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
    
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
        say "/capture" // all i did :p
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:

Did you try this?

It has:
say "/capturf"
and:
say "/capture"
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Mila.cs ✅ said:
TheyCallMe said:
Bring
up
my
post
;)

Code:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd


while true
wait 0
end

:in_rpc                  
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
    
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
        say "/capture" // all i did :p
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:

Did you try this?

It has:
say "/capturf"
and:
say "/capture"

Now the game crashes for some reason. What's going wrong?
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
TheyCallMe said:
Mila.cs ✅ said:
TheyCallMe said:
Bring
up
my
post
;)

Code:
{$CLEO}
{$INCLUDE SF}

0000: NOP
  
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: "cap" @cmd


while true
wait 0
end

:in_rpc                  
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
    
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    //chatmsg "Text: %s" -1 4@
    IF AND
    15@ == TRUE
    0C29: $NOT_USED = stristr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid."
    THEN
        say "/capturf"
        say "/capture" // all i did :p
    END
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

:cmd
0B12: 15@ = 15@ XOR TRUE

IF
15@ == TRUE
THEN
    PRINTF " Auto capturf Enabled" 2000
ELSE
    PRINTF " Auto capturf Disabled" 2000
END

0B43:

Did you try this?

It has:
       say "/capturf"
and:
       say "/capture"

Now the game crashes for some reason. What's going wrong?

PHP:
{$CLEO .cs}

0000:


REPEAT
wait 0
UNTIL 0AFA:

0B34: "cap" @cmd

0AC8: 1@ = allocate_memory_size 256
0AC8: 2@ = allocate_memory_size 256

WHILE TRUE
wait 0
FOR 0@ = 98 TO 99 /// GET 98 AND 99 CHAT LINES
0B75: samp get_chat_string 1@ text_to 2@ prefix_to 3@ color_to 4@ prefix_color_to 5@

IF AND
15@ == TRUE // WORKS ONLY IF COMMAND ENABLED
0C29: $NOT_USED = stristr string1 2@ string2 "You have 5 minutes to sign the check before it becomes invalid."
THEN
    0C8F: "/capturf"
    wait 1000 // wait one sec and then say /capture 
    0C8F: "/capture"
    0AF8: "This text color is: %x" -1 4@
END

END // END WHILE TRUE
END // END FOR 0@ = 98 TO 99 /// GET 98 AND 99 CHAT LINES


IF
15@ == TRUE
THEN
    PRINTF "Auto capturf ~G~Enabled" 2000 
ELSE
    PRINTF "Auto capturf ~R~Disabled" 2000
END

0B43:

You checked this? .:
 

Attachments

  • Untitled.png
    Untitled.png
    92.7 KB · Views: 26

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
16
Location
Romania
@Parazitas

WHY U USE UPPERCASE LETTERS

[shcode=cpp]
if or
bla bla bla
bla bla bla x2
then[/shcode]

LOOKS MORE NICELY
 
Status
Not open for further replies.
Top