CLEO Help SAMPFUNCS MOD HELP

CLEO related
Status
Not open for further replies.

cacapipi69

Member
Joined
Nov 16, 2019
Messages
5
Reaction score
0
Location
comuna fa cu mana
i found this script and modifiy it a little but i still need help, i dont know how to do the thing with %d and %s, to find id's etc. When in the chat appears "Use [/accept licence ID" i want this script to find the id and then write in the chat "/accept licence ID" but i dont know how. Also, i want this script to be every time active, every time when "Use [accept licence ID" appears, every time /accept licence ID not just once and done.


IF something is in plus in this script and don t do anything, please delete it.



Code:
{$CLEO .cs}
0000: NOP

REPEAT
WAIT 0
UNTIL 0AFA:

WHILE TRUE
WAIT 0

if
0B61:  samp is_local_player_spawned
then
    0AC8: 0@ = allocate_memory_size 260
    0AC8: 1@ = allocate_memory_size 260
    0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
    if
    0C29: $NOT_USED = stristr string1 0@ string2 "Use [/accept licence %d"
    then
        0AF9: samp say_msg "/accept licence %s"
    end
end

END
 

Ravenous

Active member
Joined
Jan 21, 2016
Messages
61
Reaction score
4
Code:
{$CLEO}
{$INCLUDE SF}

0000:
repeat
wait 0
until samp.Available()

0BE3: raknet setup_incoming_rpc_hook @acl

while true
wait 0
end

:acl
5@ = 0
0BE5: raknet 31@ = get_hook_param PARAM_PACKETID
if 31@ == RPC_ScrClientMessage
then
    alloc 27@ 256
    0C11: memset destination 27@ value 0 size 256
    0BE5: raknet 30@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 29@ = bit_stream_read 30@ type BS_TYPE_INT //color
    0BE7: raknet 28@ = bit_stream_read 30@ type BS_TYPE_INT //lenght
    0BE8: raknet bit_stream 30@ read_array 27@ size 28@
    0C0D: struct 27@ offset 28@ size 1 = 0
    if 0C18: $NOT_STRING = strstr string1 27@ string2 "Use [/accept licence"
    then   
        if
        0AD4: $NOT_USED = scan_string 27@ format "Use [/accept licence %d]" 5@
        then       
        say "/accept licence %d" 5@   
        end 
    end
    free 27@
end
0BE0: raknet hook_ret true

try this men
 

cacapipi69

Member
Joined
Nov 16, 2019
Messages
5
Reaction score
0
Location
comuna fa cu mana
Code:
{$CLEO}
{$INCLUDE SF}

0000:
repeat
wait 0
until samp.Available()

0BE3: raknet setup_incoming_rpc_hook @acl

while true
wait 0
end

:acl
5@ = 0
0BE5: raknet 31@ = get_hook_param PARAM_PACKETID
if 31@ == RPC_ScrClientMessage
then
    alloc 27@ 256
    0C11: memset destination 27@ value 0 size 256
    0BE5: raknet 30@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 29@ = bit_stream_read 30@ type BS_TYPE_INT //color
    0BE7: raknet 28@ = bit_stream_read 30@ type BS_TYPE_INT //lenght
    0BE8: raknet bit_stream 30@ read_array 27@ size 28@
    0C0D: struct 27@ offset 28@ size 1 = 0
    if 0C18: $NOT_STRING = strstr string1 27@ string2 "Use [/accept licence"
    then  
        if
        0AD4: $NOT_USED = scan_string 27@ format "Use [/accept licence %d]" 5@
        then      
        say "/accept licence %d" 5@  
        end
    end
    free 27@
end
0BE0: raknet hook_ret true

try this men

i copied paste it in sanny builder and then did a .cs mod but this didn t accepted the licence request, maybe bcs is a yellow text? i put a screenshot.
 

Attachments

  • 1574801884410.png
    1574801884410.png
    2 MB · Views: 24

Ravenous

Active member
Joined
Jan 21, 2016
Messages
61
Reaction score
4
try with this
Code:
{$CLEO}
{$INCLUDE SF}

0000:
repeat
wait 0
until samp.Available()

0BE3: raknet setup_incoming_rpc_hook @acl

while true
wait 0
end

:acl
5@ = 0
0BE5: raknet 31@ = get_hook_param PARAM_PACKETID
if 31@ == RPC_ScrClientMessage
then
    alloc 27@ 256
    0C11: memset destination 27@ value 0 size 256
    0BE5: raknet 30@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 29@ = bit_stream_read 30@ type BS_TYPE_INT //color
    0BE7: raknet 28@ = bit_stream_read 30@ type BS_TYPE_INT //lenght
    0BE8: raknet bit_stream 30@ read_array 27@ size 28@
    0C0D: struct 27@ offset 28@ size 1 = 0
    if 0C18: $NOT_STRING = strstr string1 27@ string2 "Use [/accept licence"
    then
        if
        0AD4: $NOT_USED = scan_string 27@ format "Use [/accept licence %d] to accept licence request." 5@
        then    
        say "/accept licence %d" 5@
        end
    end
    free 27@
end
0BE0: raknet hook_ret true

If it doesn't work change
0AD4: $NOT_USED = scan_string 27@ format "Use [/accept licence %d] to accept licence request." 5@
with
0AD4: $NOT_USED = scan_string 27@ format "Use [/accept licence %d] to accept licence request.\n" 5@
 

cacapipi69

Member
Joined
Nov 16, 2019
Messages
5
Reaction score
0
Location
comuna fa cu mana
:(( still doesn t work.., i coppied from the chatlog... "{FFFF45}Use [/accept licence 179] to accept licence request.", isn t any way to do it? or maybe i compile it wrong? i have sampfuncs 5.4.0, thanks for trying man by the way
 

Attachments

  • 1574806879316.png
    1574806879316.png
    1.2 MB · Views: 17

Ravenous

Active member
Joined
Jan 21, 2016
Messages
61
Reaction score
4
ok then use
0AD4: $NOT_USED = scan_string 27@ format "{FFFF45}Use [/accept licence %d] to accept licence request." 5@
or
0AD4: $NOT_USED = scan_string 27@ format "{FFFF45}Use [/accept licence %d] to accept licence request.\n" 5@

N-ai pt ce.
 
Last edited:
Status
Not open for further replies.
Top