Если ты поднимал пикап только тогда, когда подходил к нему, то возможно, что стоит защита на поднятие пикапа с расстояния.
К тому же, есть легче способ, опкодом: 0BD1: samp send_picked_up_pickup 3@
Создай объект на необх. позиции, телепортируй туда актера и меняй позицию объекта вместе с углом поворота исходя из данных игрока.
Есть другой способ, но мне кажется он будет куда хуже.
{$CLEO }
0000:
wait 1750
0B34: samp register_client_command "model" to_label @model
model.Load(2567)
038B: load_requested_models
while true
wait 0
if 0@ == 1
then
0@ = 0
// actor.StorePos($PLAYER_ACTOR, 2@, 3@, 4@)
0172: 5@ = actor $PLAYER_ACTOR Z_angle
// 0107: 1@ = create_object 2@ 3@ 4@
// 1@ = Object.Init(2567, 2@, 3@, 4@)
// 4@ -= 2.0
// 01BB: store_object 1@ position_to 2@ 3@ 4@
0177: set_object 1@ Z_angle_to 5@
070A: AS_actor $PLAYER_ACTOR attach_to_object 1@ offset 0.0 0.0 -3.0 on_bone 6 9 perform_animation "NULL" IFP_file "NULL" time -1
end
end
:model
if model.Available(2567)
then
1@ = Object.Init(2567, 2@, 3@, 4@)
model.Destroy(2567)
0@ = 1
end
samp.CmdRet()
вот что получилось. Но она не помогает, какой опкод или как сделать, чтобы я по нему ходить мог?
PHP:{$CLEO } 0000: wait 1750 0B34: samp register_client_command "model" to_label @model model.Load(2567) 038B: load_requested_models while true wait 0 if 0@ == 1 then 0@ = 0 // actor.StorePos($PLAYER_ACTOR, 2@, 3@, 4@) 0172: 5@ = actor $PLAYER_ACTOR Z_angle // 0107: 1@ = create_object 2@ 3@ 4@ // 1@ = Object.Init(2567, 2@, 3@, 4@) // 4@ -= 2.0 // 01BB: store_object 1@ position_to 2@ 3@ 4@ 0177: set_object 1@ Z_angle_to 5@ 070A: AS_actor $PLAYER_ACTOR attach_to_object 1@ offset 0.0 0.0 -3.0 on_bone 6 9 perform_animation "NULL" IFP_file "NULL" time -1 end end :model if model.Available(2567) then 1@ = Object.Init(2567, 2@, 3@, 4@) model.Destroy(2567) 0@ = 1 end samp.CmdRet()
{$CLEO }
0000:
wait 1750
0B34: samp register_client_command "model" to_label @model
while true
wait 0
if 0@ == 1
then
actor.StorePos($PLAYER_ACTOR, 2@, 3@, 4@)
0172: 5@ = actor $PLAYER_ACTOR Z_angle
// 0107: 1@ = create_object 2@ 3@ 4@
// 1@ = Object.Init(2567, 2@, 3@, 4@)
4@ -= 2.8
// 01BB: store_object 1@ position_to 2@ 3@ 4@
0177: set_object 1@ Z_angle_to 5@
01BC: put_object 1@ at 2@ 3@ 4@
// 070A: AS_actor $PLAYER_ACTOR attach_to_object 1@ offset 0.0 0.0 -2.5 on_bone 6 9 perform_animation "NULL" IFP_file "NULL" time -1
// 0382: set_object 1@ collision_detection 0
end
end
:model
model.Load(2567)
038B: load_requested_models
if model.Available(2567)
then
1@ = object.Create(2567, 2@, 3@, 4@)
//1@ = Object.Init(2567, 2@, 3@, 4@)
model.Destroy(2567)
0@ = 1
end
samp.CmdRet()
{$CLEO}
{$INCLUDE SF}
0001: wait 0 ms
0662: "by legend2360"
0662: "BlastHack - cheating is art"
while not SAMP.Available()
wait 400
end
0B34: samp register_client_command "model" to_label @model
0@ = 0
while true
wait 0
if 0@ <> 0
then
if 0@ == 1
then
#AB_WAREHOUSESHELF.Load
while not #AB_WAREHOUSESHELF.Available
wait 0
end
1@ = Object.Create(#AB_WAREHOUSESHELF, 0.0, 0.0, 0.0)
Object.SetImmunities(1@, 1, 1, 1, 1, 1)
0750: set_object 1@ visibility true
0382: set_object 1@ collision_detection true
#AB_WAREHOUSESHELF.Destroy
0@ = 2 // attach
continue
end
if 0@ == 2
then
0AB1: call_scm_func @_attachObjectToPlayer 5 object 1@ offsetXYZ 0.0 0.0 -2.94 tp_actor false
end
end
end
:model
0@++
if 0@ > 2
then
0@ = 0
if 03CA: object 1@ exists
then
Object.Destroy(1@)
1@ = 0
end
end
0AD1: show_formatted_text_highpriority "~P~%d" time 1500 0@
0B43: samp cmd_ret
:_attachObjectToPlayer
// call_scm_func @_attachObjectToPlayer 5 object 0@ offsetXYZ 1@ 2@ 3@ tp_actor 4@
04C4: store_coords_to 5@ 6@ 7@ from_actor $PLAYER_ACTOR with_offset 1@ 2@ 3@
if 4@ == true
then 00A1: put_actor $PLAYER_ACTOR at 5@ 6@ 7@
end
0172: 8@ = actor $PLAYER_ACTOR Z_angle
// "Attach"
01BC: put_object 0@ at 5@ 6@ 7@
0177: set_object 0@ Z_angle_to 8@
0AB2: ret 0
Бедный код, что хочешь, то с ним и делай:
Код:{$CLEO} {$INCLUDE SF} 0001: wait 0 ms 0662: "by legend2360" 0662: "BlastHack - cheating is art" while not SAMP.Available() wait 400 end 0B34: samp register_client_command "model" to_label @model 0@ = 0 while true wait 0 if 0@ <> 0 then if 0@ == 1 then #AB_WAREHOUSESHELF.Load while not #AB_WAREHOUSESHELF.Available wait 0 end 1@ = Object.Create(#AB_WAREHOUSESHELF, 0.0, 0.0, 0.0) Object.SetImmunities(1@, 1, 1, 1, 1, 1) 0750: set_object 1@ visibility true 0382: set_object 1@ collision_detection true #AB_WAREHOUSESHELF.Destroy 0@ = 2 // attach continue end if 0@ == 2 then 0AB1: call_scm_func @_attachObjectToPlayer 5 object 1@ offsetXYZ 0.0 0.0 -2.94 tp_actor false end end end :model 0@++ if 0@ > 2 then 0@ = 0 if 03CA: object 1@ exists then Object.Destroy(1@) 1@ = 0 end end 0AD1: show_formatted_text_highpriority "~P~%d" time 1500 0@ 0B43: samp cmd_ret :_attachObjectToPlayer // call_scm_func @_attachObjectToPlayer 5 object 0@ offsetXYZ 1@ 2@ 3@ tp_actor 4@ 04C4: store_coords_to 5@ 6@ 7@ from_actor $PLAYER_ACTOR with_offset 1@ 2@ 3@ if 4@ == true then 00A1: put_actor $PLAYER_ACTOR at 5@ 6@ 7@ end 0172: 8@ = actor $PLAYER_ACTOR Z_angle // "Attach" 01BC: put_object 0@ at 5@ 6@ 7@ 0177: set_object 0@ Z_angle_to 8@ 0AB2: ret 0
Спасибо, сойдет)
И это, аафк есть норм? Чтобы 0DBF: emul_key_press 32 is_up 0 работал в свернутом режиме?
Там удерживать надо, а тут 1 раз нажимает, или в repeat кинуть?
Есть такое баг после телепорта, что когда садишься в машину, тебя кидает в загрузку. Как его исправить ? Вроде какой то опкод есть
В цикл
02EB: restore_camera_with_jumpcut
Что же тут не так?То есть чтобы содержимое текстового файла вывелось в диалог? Если да, то вот:
PHP:if 0A9A: 3@ = openfile "CLEO\file.txt" mode "rt" then alloc 4@ 128 alloc 5@ 2048 0C11: memset destination 4@ value 0 size 128 0C11: memset destination 5@ value 0 size 2048 while not File.EOF(3@) if 0AD7: read_string_from_file 3@ to 4@ size 128 then 0C15: strcat destination 5@ source 4@ end 0C11: memset destination 4@ value 0 size 128 end 0B3B: samp show_dialog id 225 caption 6@ text 5@ button_1 "Close" button_2 "" style 0 free 4@ free 5@ File.Close(3@) end
{$CLEO}
{$INCLUDE SF}
0000: nop
wait 2000
0B34: samp register_client_command "222" to_label @1
while true
wait 0
if 0@ == 1
then
0A9A: 3@ = openfile "CLEO\file.txt mode" "rt"
alloc 4@ 128
alloc 5@ 2048
0C11: memset destination 4@ value 0 size 128
0C11: memset destination 5@ value 0 size 2048
while not File.EOF(3@)
if 0AD7: read_string_from_file 3@ to 4@ size 128
then 0C15: strcat destination 5@ source 4@
end
0C11: memset destination 4@ value 0 size 128
end
0B3B: samp show_dialog id 225 caption 6@ text 5@ button_1 "Close" button_2 "" style 0
free 4@
free 5@
File.Close(3@)
0@ = 0
end
end
:1
0B12: 0@ = 0@ XOR 1
if 0@ == 1
then
0AF8: samp add_message_to_chat "Âû çàïóñòèëè äèàëîã" color 0xFFD700
end
0B43: samp cmd_ret
Помогите разобраться.Зачем нужен опкод 0C11 и почему не достаточно просто 0ac8: ?
alloc 4@ 128
alloc 5@ 2048
0C11: memset destination 4@ value 0 size 128
0C11: memset destination 5@ value 0 size 2048