Отличается.диалог, созданный через новый опкод 0B80: samp 1@ = create_dialog "Caption" ничем не отличается от старого из самфункс 2.4?
Объект создан сервером?Проблема в том, что опкод возвращает 0, хотя я стою напротив объекта под id 1609 (черепашка)
while true
wait 0
if key 46 // Delete, 0AB0:
then
if 0AB1: @SOHBIDM 1 Model 1609 ret_to: 0@
then chat "%d" 0xFFFFFF 0@
end
end
end
:SOHBIDM
var
0@ : int
1@ : int
2@ : int
3@ : int
end
for 1@ = 0 to 1000 step 1
2@ = SAMP.ObjectHandleByID(1@)
if Object.Exists(2@)
jf break // ?
0984: 3@ = object 2@ model
if 3@ == 0@
jf continue
// ret_true
0AB2: 1 2@
end
// ret_false
0AB2: 0
{$CLEO .cs}
//-------------MAIN---------------
thread 'TURRET'
if
8AAB: not file_exists "cleo\ini\Narko.ini"
else_jump @TURRET_164
0AF1: write_int 35 to_ini_file "cleo\ini\Narko.ini" section "Settings" key "KN" //IF and SET
0AF1: write_int 221 to_ini_file "cleo\ini\Narko.ini" section "Settings" key "LOMKA" //IF and SET
0AF1: write_int 1 to_ini_file "cleo\ini\Narko.ini" section "Settings" key "SBIV" //IF and SET
0AF1: write_int 1 to_ini_file "cleo\ini\Narko.ini" section "Settings" key "LOG" //IF and SET
:TURRET_164
0AF0: 22@ = get_int_from_ini_file "cleo\ini\Narko.ini" section "Settings" key "KN" //IF and SET
0AF0: 23@ = get_int_from_ini_file "cleo\ini\Narko.ini" section "Settings" key "LOMKA" //IF and SET
0AF0: 24@ = get_int_from_ini_file "cleo\ini\Narko.ini" section "Settings" key "SBIV" //IF and SET
0AF0: 25@ = get_int_from_ini_file "cleo\ini\Narko.ini" section "Settings" key "LOG" //IF and SET
:TURRET_286
wait 0
if
key_down 22@
else_jump @TURRET_495
wait 200
0@ = Actor.Health($PLAYER_ACTOR)
0@ -= 180
0@ *= -1
0@ /= 8
0@ += 1
0AF9: samp say_msg "/usedrugs %d" 0@
wait 500
if
25@ == 1
0AF8: samp add_message_to_chat "Íàðêîòèêîâ èñïîëüçîâàíî: %d." 16777215 0@
else_jump @TURRET_286
if
24@ == 1
else_jump @TURRET_286
wait 550
0615: define_AS_pack_begin 18@
0605: actor -1 perform_animation_sequence "HANDSUP" IFP_file "PED" 4.0 loop 0 0 0 0 time 100 // versionA
0618: assign_actor $PLAYER_ACTOR to_AS_pack 18@
061B: remove_references_to_AS_pack 18@
jump @TURRET_286
:TURRET_495
wait 0
if
key_down 23@
else_jump @TURRET_286
wait 200
0AF9: samp say_msg "/usedrugs 1"
if
24@ == 1
else_jump @TURRET_286
wait 550
0615: define_AS_pack_begin 18@
0605: actor -1 perform_animation_sequence "HANDSUP" IFP_file "PED" 4.0 loop 0 0 0 0 time 100 // versionA
0618: assign_actor $PLAYER_ACTOR to_AS_pack 18@
061B: remove_references_to_AS_pack 18@
jump @TURRET_286
Заменить key_down 22@ на 0AB0: 22@Вылизает ошибка ''неизвестная команда key_down 22@'' что делать помогите !!!!
Заменить key_down 22@ на 0AB0: 22@
//-------------MAIN---------------
0000: NOP
:Noname_29
0001: wait 0 ms
00D6: if
0AB0: key_pressed 2
004D: jump_if_false @Noname_29
0050: gosub @Noname_427
00D6: if
0AE1: 20@ = random_actor_near_point 0@ 1@ 2@ in_radius 10.0 find_next 0 pass_deads 1 //IF and SET
004D: jump_if_false @Noname_420
0ACD: show_text_highpriority "Player found" time 2000
0002: jump @Noname_29
:Noname_420
0002: jump @Noname_29
:Noname_427
00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
0A9F: 5@ = current_thread_pointer
000A: 5@ += 80
0A8E: 6@ = 5@ + 12 // int
0AA6: call_method 5327216 11989032 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@
00D6: if
86BD: not no_obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 1 actor 1 object 1 particle 0
004D: jump_if_false @Noname_546
0002: jump @Noname_577
:Noname_546
000B: 4@ += 1.0
00D6: if
0021: 4@ > 1000.0
004D: jump_if_false @Noname_427
:Noname_577
0007: 0@ = 0.0
0007: 1@ = 0.0
0007: 2@ = 0.0
005B: 0@ += 8@ // (float)
005B: 1@ += 9@ // (float)
005B: 2@ += 10@ // (float)
0007: 4@ = 0.0
0051: return
Any way.I want to get the actor at the aiming position, what is wrong?
I aim at a player and the message doesn't come up.
{$CLEO}
0000:
thread 'WANTED'
if
Player.Defined($PLAYER_CHAR)
while true
0390: load_txd_dictionary 'wanted'
038F: load_texture "w0" as 1
038F: load_texture "w1" as 2
038F: load_texture "w2" as 3
038F: load_texture "w3" as 4
038F: load_texture "w4" as 5
038F: load_texture "w5" as 6
038F: load_texture "w6" as 7
1@ = Player.WantedLevel($PLAYER_CHAR)
if
1@ == 0
then
wait 0
038D: create_texture 1 position 66.0 440.0 scale 100.0 13.0 color 255 219 25 alpha 255
end
if
1@ == 1
then
wait 0
038D: create_texture 2 position 66.0 440.0 scale 100.0 13.0 color 255 219 25 alpha 255
end
if
1@ == 2
then
wait 0
038D: create_texture 3 position 66.0 440.0 scale 100.0 13.0 color 255 219 25 alpha 255
end
if
1@ == 3
then
wait 0
038D: create_texture 4 position 66.0 440.0 scale 100.0 13.0 color 255 219 25 alpha 255
end
if
1@ == 4
then
wait 0
038D: create_texture 5 position 66.0 440.0 scale 100.0 13.0 color 255 219 25 alpha 255
end
if
1@ == 5
then
wait 0
038D: create_texture 6 position 66.0 440.0 scale 100.0 13.0 color 255 219 25 alpha 255
end
if
1@ == 6
then
wait 0
038D: create_texture 7 position 66.0 440.0 scale 100.0 13.0 color 255 219 25 alpha 255
end
wait 0
0391: release_txd_dictionary
wait 0
end
wait 0
0A93: end_custom_thread
Any way.
Opcode 0AE1 not working in SAMP.
Try opcode 0AD2: 0@ = player $PLAYER_CHAR targeted_actor
But... it's probably not that.
With сycle(сheck all players on the server, measuring the distance) and SAMPFUNCS(http://blasthack.net/threads/17/).I've done that, i'm trying to get the player at the aiming position when aiming with sniper. Any other way?