Как в клео получить свой ник с ид в формате Nick_Name[id] и вывести в чат?
0B2B: samp 0@ = get_player_id_by_actor_handle $PLAYER_ACTOR
0B36: samp 1@ = get_player_nickname 0@
0AD3: 2@ = format "%s[%d]" | {Nick}1@ {ID}0@ |
{$CLEO}
0000:NOP
repeat
wait 100
until SAMP.Available()
1@ = 0
while true
if 0ADC: test_cheat "fz"
then
if 0B4C: samp is_dialog_active -1
then
0B4E: samp 1@ = get_current_dialog_id
0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input ""
wait 100
0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input ""
wait 100
0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input ""
wait 100
0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input ""
wait 100
0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input ""
wait 100
0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input ""
wait 100
0B47: samp close_current_dialog_with_button 1
end
end
что я делаю не так ?
Код:{$CLEO} 0000:NOP repeat wait 100 until SAMP.Available() 1@ = 0 while true if 0ADC: test_cheat "fz" then if 0B4C: samp is_dialog_active -1 then 0B4E: samp 1@ = get_current_dialog_id 0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input "" wait 100 0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input "" wait 100 0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input "" wait 100 0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input "" wait 100 0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input "" wait 100 0BC9: samp send_dialog_response dialog 1@ button 1 listitem 0 input "" wait 100 0B47: samp close_current_dialog_with_button 1 end end
https://sampwiki.blast.hk/wroot/images2/b/b1/Dialog_style_list.pngна какой тип диалога тебе надо ответить?
получаешь позицию чекпоинта через соответствующий хук, потом устанавливаешь угол поворота перса в эту точку и эмулишь бегКак сделать, чтобы Актер бежал на ближайший к нему чекпоинт ?
@NookieONE как минимум - вметсо переменной какая-то хуета hFONT
исходник посмотри, там я из ини шрифт загружаюКод:https://www.youtube.com/watch?v=4RE7Und0R2E
Как сделать перезагрузку скрипта, где есть рендер на экран, чтобы изменились настройки шрифта и т.п.
0A92: create_custom_thread "Имя твоего скрипта"
0A93: end_custom_thread
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
//-------------MAIN---------------
0000: NOP
:READ_2
0001: wait 100 ms
0AFA: is_samp_available
004D: jump_if_false @READ_2
0B34: samp register_client_command "/hs" to_label @READ_90
0B34: samp register_client_command "/hsoff" to_label @READ_42
:READ_42
0B43: samp cmd_ret
03A4: name_thread 'READ'
0001: wait 0 ms
00D6: if
0AAB: file_exists "CLEO\Housess.ini"
004D: jump_if_false @READ_291
:READ_90
0001: wait 0 ms
0AC8: 0@ = allocate_memory_size 256
0AD3: 0@ = format "Внимание! В доме 228 сработала сигнализация!"
0AC8: 1@ = allocate_memory_size 24
0AA5: call 8528045 num_params 1 pop 1 "Внимание! В доме %d сработала сигнализация!!"
0AF0: 4@ = get_int_from_ini_file "CLEO\Housess.ini" section "Houses" key "%d"
018A: 4@ = create_checkpoint_at 14@ 15@ 16@
0AC9: free_allocated_memory 0@
0AC9: free_allocated_memory 1@
0A93: end_custom_thread
:READ_291
0001: wait 0 ms
0AF8: samp add_message_to_chat "{FFFFFF}Файл с домами не найден." color 16777215
0A93: end_custom_thread
:razz
Samp.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
then
if
Samp.IsPlayerConnected(2@)
then
3@ = Samp.GetPlayerScore(2@)
if 3@ <= 4
then
say "/первое %d" 2@
else
say "/второе %d" 2@
end
else
chatmsg "Игрок с ID: %d не найден" -1 2@
end
end
Samp.CmdRet()
так может хук покажешь?Привет. При использовании хука стало крашить после ввода команды:
CLEO::razz Samp.IsCommandTyped(0@) if 0AD4: 1@ = scan_string 0@ format "%d" 2@ then if Samp.IsPlayerConnected(2@) then 3@ = Samp.GetPlayerScore(2@) if 3@ <= 4 then say "/первое %d" 2@ else say "/второе %d" 2@ end else chatmsg "Игрок с ID: %d не найден" -1 2@ end end Samp.CmdRet()
так может хук покажешь?
:amm
28@ = Samp.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
0B36: samp 29@ = get_player_nickname 28@
0BE5: raknet 0@ = get_hook_param 1
00D6: if
0039: 0@ == 93
then
0BE5: raknet 1@ = get_hook_param 0
0BEB: raknet bit_stream 1@ ignore_bits 32
0BE7: raknet 2@ = bit_stream_read 1@ type 3
0BE8: raknet bit_stream 1@ read_array 3@ size 2@
0C1E: array 3@ element 2@ el_size 1 = 0
0AD3: 8@ = format "raz %s" 29@
if
0C18: 0 = strstr string1 3@ string2 8@
then
//code
end
0AD3: 8@ = format "dva %s" 29@
if
0C18: 0 = strstr string1 3@ string2 8@
then
//code
end
0AD3: 8@ = format "tri %s" 29@
if
0C18: 0 = strstr string1 3@ string2 8@
then
//code
end
0AD3: 8@ = format "4 %s" 29@
if
0C18: 0 = strstr string1 3@ string2 8@
then
//code
end
end
0BE0: raknet hook_ret 1