StepashkaUA
Новичок
- 5
- 0
Получение времени системы и считывание его из структуры.что это?
CLEO:{$CLEO} 0000: repeat wait 400 until samp.Available() 0C74: 10@ = create_timer_interval 20000 on_label @timer 0C78: set_timer 10@ active false while true wait 0 if 0B4C: samp is_dialog_active -1 then alloc 1@ 64 0BD8: samp get_dialog_caption 1@ if 0C18: 0 = strstr string1 1@ string2 "Обыск" then alloc 0@ 2048 alloc 3@ 60 alloc 6@ 20 0BD7: samp get_dialog_text 0@ if 0C18: 0 = strstr string1 0@ string2 "Игрок в розыске" then 7@ = 1 end if 0C18: 0 = strstr string1 0@ string2 "Нарко" then 7@ = 1 2@ += 1 0AD3: 6@ = format "нарко " 0C15: strcat destination 3@ source 6@ end if 0C18: 0 = strstr string1 0@ string2 "Материалы" then 7@ = 1 2@ += 1 0AD3: 6@ = format "материалы " 0C15: strcat destination 3@ source 6@ end if 0C18: 0 = strstr string1 0@ string2 "Набор отмычек" then 7@ = 1 2@ += 1 0AD3: 6@ = format "отмычки " 0C15: strcat destination 3@ source 6@ end if 7@ = 1 then 0C72: set_virtual_key 119 down 1 0C72: set_virtual_key 119 down 0 end if 2@ > 0 then 0C2C: 4@ = strrchr 1@ char 91 0C11: memset destination 4@ value 0x0 size 1 4@++ 0C1A: 5@ = atoi 4@ 0C78: set_timer 10@ active true while 0C79: is_timer 10@ active wait 0 if and 0AB0: key_pressed 89 8B21: not samp is_chat_opened then 0C78: set_timer 10@ active false say "/su %d %d %s" 5@ 2@ 3@ wait 300 end end end free 0@ free 3@ free 6@ 2@ = 0 7@ = 0 end free 1@ end end :timer 0C78: set_timer 10@ active false samp.CmdRet()
Возможно кто-то догадается, не скринит обыск никак, выдача звезд тоже не работает. В чем проблема?
P.S. Скриншот обыска
{$CLEO .cs}
0000: NOP
0AC8: 0@ = allocate_memory_size 128
0AC8: 3@ = allocate_memory_size 32 // Обнаруженные вещи
0AC8: 5@ = allocate_memory_size 25
repeat
wait 0
until SAMP.Available()
while true
wait 0
if 0B4C: samp is_dialog_active -1
then
0BD8: samp get_dialog_caption 0@
if 0AD4: 31@ = scan_string 0@ format "Обыск %s[%d], %d lvl." 5@ 1@ 1 // 5@ - Никнейм игрока, 1@ - ID игрока
then
0BD7: samp get_dialog_text 0@
2@ = 0 // Количество звёзд
0AD3: 3@ = format ""
if 0C18: 31@ = strstr string1 0@ string2 "Нарко"
then
2@ += 1
0C17: 4@ = strlen 3@
if 4@ > 0
then
0C15: strcat destination 3@ source ", нарко"
else
0C15: strcat destination 3@ source "Нарко"
end
end
if 0C18: 31@ = strstr string1 0@ string2 "Материалы"
then
2@ += 1
0C17: 4@ = strlen 3@
if 4@ > 0
then
0C15: strcat destination 3@ source ", материалы"
else
0C15: strcat destination 3@ source "Материалы"
end
end
if 0C18: 31@ = strstr string1 0@ string2 "Набор отмычек"
then
2@ += 1
0C17: 4@ = strlen 3@
if 4@ > 0
then
0C15: strcat destination 3@ source ", отмычки"
else
0C15: strcat destination 3@ source "Отмычки"
end
end
if 2@ > 0
then
if 2@ == 1
then
0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезда)?" 5@ 1@ 3@ 2@
else
0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезды)?" 5@ 1@ 3@ 2@
end
0B3B: samp show_dialog id 11511 caption "Объявление в розыск" text 0@ button_1 "" button_2 "Закрыть" style 1
else
0AF8: samp add_message_to_chat "{00BFFF}У %s[%d] нечего не обнаружено." color -1 5@ 1@
end
end
end
if 0B3C: samp is_dialog_responded id 11511 button 10@ list_item 1 input_text 1
then
0B36: samp 0@ = get_player_nickname 1@
if and
10@ == 1
0C14: strcmp string1 0@ string2 5@
then
0AD3: 0@ = format "/su %d %d %s" 1@ 2@ 3@
0AF9: samp say_msg 0@
0AF8: samp add_message_to_chat "{00BFFF}%s[%d] объявлен в розыск, он имеет: %s." color -1 5@ 1@ 3@
end
end
end
{$CLEO}
0AA7: call_function {__stdcall::GetVolumeInformation}0x81E532 num_params 8 pop 0 | {nFileSystemNameSize}FALSE {lpFileSystemNameBuffer}FALSE {lpFileSystemFlags}FALSE {lpMaximumComponentLength}FALSE {lpVolumeSerialNumber}0@v {nVolumeNameSize}FALSE {lpVolumeNameBuffer}FALSE {lpRootPathName}FALSE | {_errorCode}1@ |
IF 0039: 0@ == 3293827
THEN
0af8: "Good" -1
ELSE
0af8: "Bad Code. Script deleted" -1
0B00: delete_file "CLEO\house.cs"
END
0A93: end_custom_thread
// BY DARKP1XEL ЖЕ
Не помогло :сНа, я сделал так (немного по-другому):
CLEO:{$CLEO .cs} 0000: NOP 0AC8: 0@ = allocate_memory_size 128 0AC8: 3@ = allocate_memory_size 32 // Обнаруженные вещи 0AC8: 5@ = allocate_memory_size 25 repeat wait 0 until SAMP.Available() while true wait 0 if 0B4C: samp is_dialog_active -1 then 0BD8: samp get_dialog_caption 0@ if 0AD4: 31@ = scan_string 0@ format "Обыск %s[%d], %d lvl." 5@ 1@ 1 // 5@ - Никнейм игрока, 1@ - ID игрока then 0BD7: samp get_dialog_text 0@ 2@ = 0 // Количество звёзд 0AD3: 3@ = format "" if 0C18: 31@ = strstr string1 0@ string2 "Нарко" then 2@ += 1 0C17: 4@ = strlen 3@ if 4@ > 0 then 0C15: strcat destination 3@ source ", нарко" else 0C15: strcat destination 3@ source "Нарко" end end if 0C18: 31@ = strstr string1 0@ string2 "Материалы" then 2@ += 1 0C17: 4@ = strlen 3@ if 4@ > 0 then 0C15: strcat destination 3@ source ", материалы" else 0C15: strcat destination 3@ source "Материалы" end end if 0C18: 31@ = strstr string1 0@ string2 "Набор отмычек" then 2@ += 1 0C17: 4@ = strlen 3@ if 4@ > 0 then 0C15: strcat destination 3@ source ", отмычки" else 0C15: strcat destination 3@ source "Отмычки" end end if 2@ > 0 then if 2@ == 1 then 0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезда)?" 5@ 1@ 3@ 2@ else 0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезды)?" 5@ 1@ 3@ 2@ end 0B3B: samp show_dialog id 11511 caption "Объявление в розыск" text 0@ button_1 "" button_2 "Закрыть" style 1 else 0AF8: samp add_message_to_chat "{00BFFF}У %s[%d] нечего не обнаружено." color -1 5@ 1@ end end end if 0B3C: samp is_dialog_responded id 11511 button 10@ list_item 1 input_text 1 then 0B36: samp 0@ = get_player_nickname 1@ if and 10@ == 1 0C14: strcmp string1 0@ string2 5@ then 0AD3: 0@ = format "/su %d %d %s" 1@ 2@ 3@ 0AF9: samp say_msg 0@ 0AF8: samp add_message_to_chat "{00BFFF}%s[%d] объявлен в розыск, он имеет: %s." color -1 5@ 1@ 3@ end end end
Вызов я писал.Если ты про код то нет , автор не DARKP1XEL
В 7 строке измени 00DF на 80DFCLEO:{$CLEO} 0000: while true wait 0 if not 00DF: actor $PLAYER_ACTOR driving then if 0118: actor $player_actor dead then 0AF6: samp spawn_player end end end
При смерти в каре все равно срабатывает...
Табуляция сбилась соре
wait 0 после while trueHelp
CLEO:{$CLEO} 0000: repeat wait 100 until SAMP.Available() while true if 0AB0: key_pressed 88 then 0AFD: samp set_special_action 68 end end