RPC_ScrShowDialog = 61

elsea56

Новичок
Автор темы
3
0
0BE3: raknet setup_incoming_rpc_hook @DIALOGHOOK



: DIALOGHOOK
if
29 @ == 1
then
alloc 26 @ 64
0BE5: raknet 28 @ = get_hook_param PARAM_PACKETID
format 26 @ "% d" 28 @
0AF8: samp add_message_to_chat 26 @
if
28 @ == 61
then
0AF8: samp add_message_to_chat "Hook......?"
0BD8: samp get_dialog_caption 27 @
end
end

0AF8: samp add_message_to_chat "Hook ......?" is never outputted which means RPC_ScrShowDialog is never hit ..? any ideas on why? Also in chatlogs there is 61 nowhere to be found ..

 

astap_

Известный
Всефорумный модератор
626
597
it works fine
CLEO:
{$CLEO}
{$INCLUDE SF}
0000:
thread "astap"

while not SAMP.Available()
    wait 0
end
29@ = 1
0BE3: raknet setup_incoming_rpc_hook @DIALOGHOOK

while true
    wait 0
end

:DIALOGHOOK
if 29@ == 1
then
    0BE5: raknet 28@ = get_hook_param PARAM_PACKETID
    chatmsg "iRPC: %d" -1 28@
    if 28@ == 61 {RPC_SCRSHOWDIALOG}
    then
        chatmsg "Hook......?" -1
        alloc 27@ 256
        0BD8: samp get_dialog_caption 27@
        chatmsg "Caption: %s" -1 27@
        free 27@
    end
end
0BE0: raknet hook_ret true {!!!}