{$CLEO .cs}
//-------------MAIN---------------
0000: NOP
:NONAME_2
wait 0
SAMP.Available
else_jump @NONAME_2
0B34: samp register_client_command "fs" to_label @NONAME_36
0BDE: pause_thread 0
:NONAME_36
SAMP.IsCommandTyped(0@)
if and
0AD4: 1@ = scan_string 0@ format "%d" 2@
2@ >= 0
not 2@ > 16000
not Actor.Driving($PLAYER_ACTOR)
else_jump @NONAME_108
Model.Load(2@)
038B: load_requested_models
09C7: change_player $PLAYER_CHAR model_to 2@
Model.Destroy(2@)
:NONAME_108
SAMP.CmdRet
{$CLEO}
0000:
REPEAT
0001: 0
UNTIL 0AFA:
0BB9: samp 0@ = get_pickup_pool_ptr
WHILE TRUE
0001: 0
FOR 1@ = 0 TO {MAX_PICKUPS}4096 [STEP = 1]
IF 0B51: samp 2@ = pickup_handle_by_id 1@
THEN
0A90: 2@ = 1@ * 20
000A: 2@ += 61444
000A: 2@ += 0@ // stPickup
0A8D: 3@ = read_memory 2@ size 4 virtual_protect TRUE // iModelID
IF 0039: 3@ == 19062
THEN
0C0C: 3@ = struct 2@ offset 8 size 4 // X
0C0C: 4@ = struct 2@ offset 12 size 4 // Y
0C0C: 5@ = struct 2@ offset 16 size 4 // Z
IF 00C2: sphere_onscreen 3@ 4@ 5@ radius 5.0
THEN
0B55: convert_3D_coords 3@ 4@ 5@ to_screen 3@ 4@
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
0B55: convert_3D_coords 5@ 6@ 7@ to_screen 5@ 6@
0B68: render draw_line_point1 5@ 6@ point2 3@ 4@ width 1 color 0x1FFF0F00
END
END
END
END
END
Всем ку, всем привет, всем здравствуйте. Как сделать так, чтоб в данном клео в зоне стрима искало несколько объектов? Мне нужно чтоб искало 19059, 19060, 19061, 19062, 19063, как это все объеденить в один клео файл?
CLEO:{$CLEO} 0000: REPEAT 0001: 0 UNTIL 0AFA: 0BB9: samp 0@ = get_pickup_pool_ptr WHILE TRUE 0001: 0 FOR 1@ = 0 TO {MAX_PICKUPS}4096 [STEP = 1] IF 0B51: samp 2@ = pickup_handle_by_id 1@ THEN 0A90: 2@ = 1@ * 20 000A: 2@ += 61444 000A: 2@ += 0@ // stPickup 0A8D: 3@ = read_memory 2@ size 4 virtual_protect TRUE // iModelID IF 0039: 3@ == 19062 THEN 0C0C: 3@ = struct 2@ offset 8 size 4 // X 0C0C: 4@ = struct 2@ offset 12 size 4 // Y 0C0C: 5@ = struct 2@ offset 16 size 4 // Z IF 00C2: sphere_onscreen 3@ 4@ 5@ radius 5.0 THEN 0B55: convert_3D_coords 3@ 4@ 5@ to_screen 3@ 4@ 00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@ 0B55: convert_3D_coords 5@ 6@ 7@ to_screen 5@ 6@ 0B68: render draw_line_point1 5@ 6@ point2 3@ 4@ width 1 color 0x1FFF0F00 END END END END END
IF OR
0039: 3@ == 19059
0039: 3@ == 19060
0039: 3@ == 19061
0039: 3@ == 19062
0039: 3@ == 19063
THEN
IF AND
0039: 3@ == 19059
0039: 3@ == 19060
0039: 3@ == 19061
0039: 3@ == 19062
0039: 3@ == 19063
THEN
Хочу компильнуть данное клео, но вылазят всякие ошибки в Sanny Builder 3
cleo:{$CLEO .cs} //-------------MAIN--------------- 0000: NOP :NONAME_2 wait 0 SAMP.Available else_jump @NONAME_2 0B34: samp register_client_command "fs" to_label @NONAME_36 0BDE: pause_thread 0 :NONAME_36 SAMP.IsCommandTyped(0@) if and 0AD4: 1@ = scan_string 0@ format "%d" 2@ 2@ >= 0 not 2@ > 16000 not Actor.Driving($PLAYER_ACTOR) else_jump @NONAME_108 Model.Load(2@) 038B: load_requested_models 09C7: change_player $PLAYER_CHAR model_to 2@ Model.Destroy(2@) :NONAME_108 SAMP.CmdRet
во втором случае он никогда ничего не отрисует, разумистили же
В первом случае он ищет один из тех что вписаны ( по идее должен показывать все нужные )CLEO:IF AND 0039: 3@ == 19059 0039: 3@ == 19060 0039: 3@ == 19061 0039: 3@ == 19062 0039: 3@ == 19063 THEN
Во втором случае он ищет только если все пикапы найдены сразу
вроде так
А как их установить?- 19 строка
CLEO:IF OR 0039: 3@ == 19059 0039: 3@ == 19060 0039: 3@ == 19061 0039: 3@ == 19062 0039: 3@ == 19063 THEN
или же
CLEO:IF AND 0039: 3@ == 19059 0039: 3@ == 19060 0039: 3@ == 19061 0039: 3@ == 19062 0039: 3@ == 19063 THEN
В первом случае он ищет один из тех что вписаны ( по идее должен показывать все нужные )
Во втором случае он ищет только если все пикапы найдены сразу
вроде так
тут нет проблем, скорее всего у тебя не установлены опкоды
.. или еще че
{$CLEO}
0000:
REPEAT
0001: 0
UNTIL 0AFA:
0BB9: samp 0@ = get_pickup_pool_ptr
WHILE TRUE
0001: 0
FOR 1@ = 0 TO {MAX_PICKUPS}4096 [STEP = 1]
IF 0B51: samp 2@ = pickup_handle_by_id 1@
THEN
0A90: 2@ = 1@ * 20
000A: 2@ += 61444
000A: 2@ += 0@ // stPickup
0A8D: 3@ = read_memory 2@ size 4 virtual_protect TRUE // iModelID
IF OR
0039: 3@ == 19059
0039: 3@ == 19060
0039: 3@ == 19061
0039: 3@ == 19062
0039: 3@ == 19063
THEN
0C0C: 3@ = struct 2@ offset 8 size 4 // X
0C0C: 4@ = struct 2@ offset 12 size 4 // Y
0C0C: 5@ = struct 2@ offset 16 size 4 // Z
IF 00C2: sphere_onscreen 3@ 4@ 5@ radius 5.0
THEN
0B55: convert_3D_coords 3@ 4@ 5@ to_screen 3@ 4@
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
0B55: convert_3D_coords 5@ 6@ 7@ to_screen 5@ 6@
0B68: render draw_line_point1 5@ 6@ point2 3@ 4@ width 5 color 0x1F9802f5
END
END
END
END
END
0AA8: 0x6A0050 0xC1B340 1 0 'CRED445' 10@
0AA5: 0x718600 2 2 10@ "Object Is Here!"
WHILE TRUE
WAIT 0
// do something...
0342: set_text_draw_centered 1
03E0: draw_text_behind_textures 0
033F: set_text_draw_letter_size width 0.17 height 0.77
081C: draw_text_outline 1 RGBA 0 0 0 255
0340: set_text_draw_RGBA 1@ 2@ 3@ 255 // 1@ represent RED, 2@ - GREEN, 3@ - BLUE...
045A: draw_text_1number 7@ 8@ GXT 'CRED445' number 0@ // 7@, 8@ is position of pickup...
END // loop end
// storing pickup pos to vars 7, 8, 9...
065B: store_pickup $PickupVar position_to 7@ 8@ 9@ radius
// storing player pos to vars 12, 13, 14
Actor.StorePos($PLAYER_ACTOR, 12@, 13@, 14@)
// getting distance between Player and pickup and store it to var 22@
050A: 22@ = distance_between_XYZ 7@ 8@ 9@ and_XYZ 12@ 13@ 14@
// you can make it float if you want to be precious
0092: 22@ = float 22@ to_integer
// print distance...
0AD1: "%d" 100 22@
Here you go...Хочу компильнуть данное клео, но вылазят всякие ошибки в Sanny Builder 3
cleo:{$CLEO .cs} //-------------MAIN--------------- 0000: NOP :NONAME_2 wait 0 SAMP.Available else_jump @NONAME_2 0B34: samp register_client_command "fs" to_label @NONAME_36 0BDE: pause_thread 0 :NONAME_36 SAMP.IsCommandTyped(0@) if and 0AD4: 1@ = scan_string 0@ format "%d" 2@ 2@ >= 0 not 2@ > 16000 not Actor.Driving($PLAYER_ACTOR) else_jump @NONAME_108 Model.Load(2@) 038B: load_requested_models 09C7: change_player $PLAYER_CHAR model_to 2@ Model.Destroy(2@) :NONAME_108 SAMP.CmdRet
thanksPut this on top of the srcipt
CLEO:0AA8: 0x6A0050 0xC1B340 1 0 'CRED445' 10@ 0AA5: 0x718600 2 2 10@ "Object Is Here!"
Main loop...
CLEO:WHILE TRUE WAIT 0 // do something... 0342: set_text_draw_centered 1 03E0: draw_text_behind_textures 0 033F: set_text_draw_letter_size width 0.17 height 0.77 081C: draw_text_outline 1 RGBA 0 0 0 255 0340: set_text_draw_RGBA 1@ 2@ 3@ 255 // 1@ represent RED, 2@ - GREEN, 3@ - BLUE... 045A: draw_text_1number 7@ 8@ GXT 'CRED445' number 0@ // 7@, 8@ is position of pickup... END // loop end
For meters i will give you an example..
CLEO:// storing pickup pos to vars 7, 8, 9... 065B: store_pickup $PickupVar position_to 7@ 8@ 9@ radius // storing player pos to vars 12, 13, 14 Actor.StorePos($PLAYER_ACTOR, 12@, 13@, 14@) // getting distance between Player and pickup and store it to var 22@ 050A: 22@ = distance_between_XYZ 7@ 8@ 9@ and_XYZ 12@ 13@ 14@ // you can make it float if you want to be precious 0092: 22@ = float 22@ to_integer // print distance... 0AD1: "%d" 100 22@
Here you go...
You should look for some tut on youtube for including sampfuncs functions...
А как их установить?
{$CLEO}
{$INCLUDE SF}
0000:
repeat
wait 0
until Samp.Available()
0BE3: raknet setup_incoming_rpc_hook @Hook
0BDE: pause_thread 0
:hook
0BE5: raknet 10@ = get_hook_param PARAM_PACKETID
if 10@ == RPC_SCRCLIENTMESSAGE
then
0BE5: raknet 11@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 12@ = bit_stream_read 11@ type BS_TYPE_INT
0BE7: raknet 13@ = bit_stream_read 11@ type BS_TYPE_INT
0AC8: 14@ = allocate_memory_size 256
0BE8: raknet bit_stream 11@ read_array 14@ size 13@
0C0D: struct 14@ offset 13@ size 1 = 0
if 0C29: 15@ = stristr string1 14@ string2 "по цене 3.333 руб"
then
say "/accept"
0AC9: free_allocated_memory 14@
0BE0: raknet hook_ret false
else
0AC9: free_allocated_memory 14@
end
end
0BE0: raknet hook_ret true
Random number in the range 3000-3999. Number unknown in advance.you want to make if in chat say 3022 to type /accept right?
{$CLEO .cs}
{$USE CLEO+}
{$USE INI}
{$INCLUDE SF}
{$USE file}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
0B34: samp register_client_command "toggle" to_label @toggle
WHILE TRUE
WAIT 0
IF AND
31@ == TRUE
0B61: samp is_local_player_spawned
THEN
FOR 0@ = 99 TO 99 // Can be changed to 98 to 99, 97 to 99 - it reads the last amount of lines from the log. In this case, it reads just the last one.
0AC8: 1@ = allocate_memory_size 1024
0AC8: 2@ = allocate_memory_size 1024
0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 4@ prefix_color_to 5@
0C28: strlwr in 1@ out 1@
0AC8: 6@ = allocate_memory_size 1024
0AB1: @DeleteColorCodes 2 text 1@ memory_to_store_characters_as_text 6@
IF AND
30@ == FALSE
0C29: $NOT_USED = stristr string1 6@ string2 "по цене"
THEN
0AC8: 7@ = allocate_memory_size 1024
0AB1: @get_digits_to_print 2 text 6@ memory_to_store_digits_as_text 7@
if or
7@ >= 3000
7@ <= 3999
then
wait 700
say "/accept"
30@ = TRUE
END
END
END
IF AND
8B21: samp not_chat_opened
8B4C: samp not_dialog_active -1
0AB0: 52
THEN 30@ = FALSE
END
END
END
:toggle //command
IF 31@ == FALSE
THEN
31@ = TRUE
0AF8: samp add_message_to_chat "{46FF00}Mod on!" color 0xFFFFFF
ELSE
31@ = FALSE
0AF8: samp add_message_to_chat "{46FF00}Mod of!" color 0xFFFFFF
END
0B43: samp cmd_ret
:DeleteColorCodes
{
0AC8: 6@ = allocate_memory_size 1024
0AB1: @DeleteColorCodes 2 text 1@ memory_to_store_characters_as_text 6@
}
5@ = FALSE // inbracket
0C17: 31@ = strlen 0@
FOR 30@ = 0 TO 31@
0085: 29@ = 0@ // copy pointer
005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character)
0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
IF 28@ == 123
THEN 5@ = TRUE // inbracket
END
IF 5@ == FALSE
THEN
0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
1@ += 1 // move to next address
END
IF 28@ == 125
THEN 5@ = FALSE // inbracket
END
END
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0
:get_digits_to_print
{
0AC8: 6@ = allocate_memory_size 1024
0AB1: @get_digits_to_print 2 text 1@ memory_to_store_digits_as_text 6@
}
0C17: 31@ = strlen 0@
for 30@ = 0 to 31@
0085: 29@ = 0@ // copy pointer
005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character)
0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
if and
28@ >= 0x30 // '0'
28@ <= 0x39 // '9'
then
0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
1@ += 1 // move to next address
end
end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0
Not works :(Try it!
CLEO:{$CLEO .cs} {$USE CLEO+} {$USE INI} {$INCLUDE SF} {$USE file} 0000: REPEAT WAIT 0 UNTIL 0AFA: SAMP_IS_READY 0B34: samp register_client_command "toggle" to_label @toggle WHILE TRUE WAIT 0 IF AND 31@ == TRUE 0B61: samp is_local_player_spawned THEN FOR 0@ = 99 TO 99 // Can be changed to 98 to 99, 97 to 99 - it reads the last amount of lines from the log. In this case, it reads just the last one. 0AC8: 1@ = allocate_memory_size 1024 0AC8: 2@ = allocate_memory_size 1024 0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 4@ prefix_color_to 5@ 0C28: strlwr in 1@ out 1@ 0AC8: 6@ = allocate_memory_size 1024 0AB1: @DeleteColorCodes 2 text 1@ memory_to_store_characters_as_text 6@ IF AND 30@ == FALSE 0C29: $NOT_USED = stristr string1 6@ string2 "по цене" THEN 0AC8: 7@ = allocate_memory_size 1024 0AB1: @get_digits_to_print 2 text 6@ memory_to_store_digits_as_text 7@ if or 7@ >= 3000 7@ <= 3999 then wait 700 say "/accept" 30@ = TRUE END END END IF AND 8B21: samp not_chat_opened 8B4C: samp not_dialog_active -1 0AB0: 52 THEN 30@ = FALSE END END END :toggle //command IF 31@ == FALSE THEN 31@ = TRUE 0AF8: samp add_message_to_chat "{46FF00}Mod on!" color 0xFFFFFF ELSE 31@ = FALSE 0AF8: samp add_message_to_chat "{46FF00}Mod of!" color 0xFFFFFF END 0B43: samp cmd_ret :DeleteColorCodes { 0AC8: 6@ = allocate_memory_size 1024 0AB1: @DeleteColorCodes 2 text 1@ memory_to_store_characters_as_text 6@ } 5@ = FALSE // inbracket 0C17: 31@ = strlen 0@ FOR 30@ = 0 TO 31@ 0085: 29@ = 0@ // copy pointer 005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character) 0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character IF 28@ == 123 THEN 5@ = TRUE // inbracket END IF 5@ == FALSE THEN 0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1 1@ += 1 // move to next address END IF 28@ == 125 THEN 5@ = FALSE // inbracket END END 0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination 0AB2: ret 0 :get_digits_to_print { 0AC8: 6@ = allocate_memory_size 1024 0AB1: @get_digits_to_print 2 text 1@ memory_to_store_digits_as_text 6@ } 0C17: 31@ = strlen 0@ for 30@ = 0 to 31@ 0085: 29@ = 0@ // copy pointer 005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character) 0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character if and 28@ >= 0x30 // '0' 28@ <= 0x39 // '9' then 0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1 1@ += 1 // move to next address end end 0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination 0AB2: ret 0