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

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
doroftel said:
@Parazitas

WHY U USE UPPERCASE LETTERS

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

LOOKS MORE NICELY

UPPERCASE LETTERS ARE FREAKING AWESOME
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Parazitas said:
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? .:

I just tried that. And yup, It still crashes for some reason.


Can't that be because of a certain Cleo I am using? If it's possible I can show my cleos if needed.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
TheyCallMe said:
Parazitas said:
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? .:

I just tried that. And yup, It still crashes for some reason.


Can't that be because of a certain Cleo I am using? If it's possible I can show my cleos if needed.



Joke? I give you two working code.....

Download this.:
http://www.mediafire.com/file/b7xgm4zcyr5lwrb/Cleo+ir+Sampfuncs.rar

Put all in Gta San Andreas and Replace you old file...

Edit.:
Also if you have samp r2 you need this  SAMP+0.3.7+R1-R2.zip , becouse sampfuncs stop working if you don't have that...
http://www.mediafire.com/file/7kogxjdn4j15lp4/SAMP_0.3.7_R1-R2.zip
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Well, I have a SAMPFUNCS which are working just so perfect. I also have SAMP 0.3.7 and it works perfectly too. The first script you gave me which says "/capturf" works as a magic without any problems. But with that "/capture" one. It crashes my game. I don't even know why tbh.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
TheyCallMe said:
Well, I have a SAMPFUNCS which are working just so perfect. I also have SAMP 0.3.7 and it works perfectly too. The first script you gave me which says "/capturf" works as a magic without any problems. But with that "/capture" one. It crashes my game. I don't even know why tbh.

I tired see this shit .... , so just create account for  me in that server and give server ip adress , time to go test in server...
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Parazitas said:
TheyCallMe said:
Well, I have a SAMPFUNCS which are working just so perfect. I also have SAMP 0.3.7 and it works perfectly too. The first script you gave me which says "/capturf" works as a magic without any problems. But with that "/capture" one. It crashes my game. I don't even know why tbh.

I tired see this shit .... , so just create account for  me in that server and give server ip adress , time to go test in server...

213.32.6.232:7777
There you go. About creating an account it's easier than counting to ten. Good luck and thanks
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
TheyCallMe said:
Parazitas said:
TheyCallMe said:
Well, I have a SAMPFUNCS which are working just so perfect. I also have SAMP 0.3.7 and it works perfectly too. The first script you gave me which says "/capturf" works as a magic without any problems. But with that "/capture" one. It crashes my game. I don't even know why tbh.

I tired see this shit .... , so just create account for  me in that server and give server ip adress , time to go test in server...

213.32.6.232:7777
There you go. About creating an account it's easier than counting to ten. Good luck and thanks

1. I can't do this alone.
2. I know about signcheck systema and i know need every hour so maked simple code

PHP:
{$CLEO}
0000:

repeat
wait 100
until SAMP.Available()

const    
EVENT_TIME = $TIME
EVENT_TIME2 = $TIME2
EVENT_TIME3 = $TIME3
EVENT_TIME4 = $TIME4
end


while true
wait 0

alloc EVENT_TIME 100
call @GetLocalTime 0 to EVENT_TIME2 EVENT_TIME3 EVENT_TIME4  /// Your computer time
format EVENT_TIME "{68f442}Time{FFFFFF} %02d:%02d:%02d" EVENT_TIME2 EVENT_TIME3 EVENT_TIME4
IF
0C14: strcmp string1 EVENT_TIME3 "00"
THEN
    0C8F: "/capturf"
    chatmsg "You say command: /capturf" -1  // added just for testing
    wait 1000 // wait 1 sec
    0C8F: "/capture"  
    chatmsg "You say command: /capture" -1 // added just for testing
    REPEAT
    wait 0
    UNTIL 0C14: strcmp string1 EVENT_TIME3 "01" 
END
free EVENT_TIME


END

:GetLocalTime
0AA2: 0@ = "kernel32.dll"
0AA4: 1@ = "GetLocalTime" 0@
alloc 2@ 32
0AA5: 1@ 1 0 2@
2@ += 8
0A8D: 3@ = 2@ 2 0
2@ += 2
0A8D: 4@ = 2@ 2 0
2@ += 2
0A8D: 5@ = 2@ 2 0
0AA3: 0@
free 2@
ret 3 3@ 4@ 5@ 
 

TheyCallMe

Active member
Joined
Jan 18, 2018
Messages
43
Reaction score
0
Parazitas said:
TheyCallMe said:
Parazitas said:
TheyCallMe said:
Well, I have a SAMPFUNCS which are working just so perfect. I also have SAMP 0.3.7 and it works perfectly too. The first script you gave me which says "/capturf" works as a magic without any problems. But with that "/capture" one. It crashes my game. I don't even know why tbh.

I tired see this shit .... , so just create account for  me in that server and give server ip adress , time to go test in server...

213.32.6.232:7777
There you go. About creating an account it's easier than counting to ten. Good luck and thanks

1. I can't do this alone.
2. I know about signcheck systema and i know need every hour so maked simple code

PHP:
{$CLEO}
0000:

repeat
wait 100
until SAMP.Available()

const    
EVENT_TIME = $TIME
EVENT_TIME2 = $TIME2
EVENT_TIME3 = $TIME3
EVENT_TIME4 = $TIME4
end


while true
wait 0

alloc EVENT_TIME 100
call @GetLocalTime 0 to EVENT_TIME2 EVENT_TIME3 EVENT_TIME4  /// Your computer time
format EVENT_TIME "{68f442}Time{FFFFFF} %02d:%02d:%02d" EVENT_TIME2 EVENT_TIME3 EVENT_TIME4
IF
0C14: strcmp string1 EVENT_TIME3 "00"
THEN
    0C8F: "/capturf"
    chatmsg "You say command: /capturf" -1  // added just for testing
    wait 1000 // wait 1 sec
    0C8F: "/capture"  
    chatmsg "You say command: /capture" -1 // added just for testing
    REPEAT
    wait 0
    UNTIL 0C14: strcmp string1 EVENT_TIME3 "01" 
END
free EVENT_TIME


END

:GetLocalTime
0AA2: 0@ = "kernel32.dll"
0AA4: 1@ = "GetLocalTime" 0@
alloc 2@ 32
0AA5: 1@ 1 0 2@
2@ += 8
0A8D: 3@ = 2@ 2 0
2@ += 2
0A8D: 4@ = 2@ 2 0
2@ += 2
0A8D: 5@ = 2@ 2 0
0AA3: 0@
free 2@
ret 3 3@ 4@ 5@ 

Any other help? It crashes after just changing the "/capturf" with the "/capture". It just doesn't make sense lol.
 
Status
Not open for further replies.
Top