You are not logged in.
Pages: 1
пытаюсь сделать скрипт, чтоб можно было перезаряжать оружие(Клавиша R)
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007 {$VERSION 3.1.0027} {$CLEO .cs} //-------------MAIN--------------- 0000: NOP :NONAME_2 wait 0 0470: 2@ = actor $PLAYER_ACTOR current_weapon if and Player.Controllable($PLAYER_CHAR) not Actor.Driving($PLAYER_ACTOR) not Actor.Dead($PLAYER_ACTOR) jf @NONAME_2 if or 2@ == 22 2@ == 28 2@ == 32 jf @NONAME_79 jump @NONAME_239 :NONAME_79 if 2@ == 23 jf @NONAME_104 jump @NONAME_426 :NONAME_104 if 2@ == 24 jf @NONAME_129 jump @NONAME_622 :NONAME_129 if or 2@ == 27 2@ == 33 2@ == 34 2@ == 30 2@ == 31 jf @NONAME_182 jump @NONAME_809 :NONAME_182 if 2@ == 29 jf @NONAME_207 jump @NONAME_989 :NONAME_207 if 2@ == 26 jf @NONAME_232 jump @NONAME_1161 :NONAME_232 jump @NONAME_2 :NONAME_239 if 84EE: not animation "COLT45" loaded jf @NONAME_277 04ED: load_animation "COLT45" jump @NONAME_277 :NONAME_277 wait 0 041A: 1@ = actor $PLAYER_ACTOR weapon 2@ ammo if 2@ == 22 then 0653: 3@ = float_stat 69 else 0653: 3@ = float_stat 75 end repeat wait 0 until 04EE: animation "COLT45" loaded if and 0597: actor $PLAYER_ACTOR crouching 3@ == 1000.0 not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_AS_pack_begin 4@ 0605: actor -1 perform_animation_sequence "colt45_crouchreload" IFP_file "colt45" 4.0 loop 0 0 0 1 time -1 0605: actor -1 perform_animation_sequence "colt45_crouchreload" IFP_file "colt45" 4.0 loop 0 0 0 1 time -1 04EB: AS_actor -1 crouch 1 0616: define_AS_pack_end 4@ 0618: assign_actor $PLAYER_ACTOR to_AS_pack 4@ 061B: remove_references_to_AS_pack 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 2000 01B4: set_player $PLAYER_CHAR can_move 1 0992: set_player $PLAYER_CHAR weapons_scrollable 1 04EF: release_animation "COLT45" jump @NONAME_2 end if and 0597: actor $PLAYER_ACTOR crouching 3@ < 1000.0 not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_AS_pack_begin 4@ 0605: actor -1 perform_animation_sequence "colt45_crouchreload" IFP_file "colt45" 4.0 loop 0 0 0 1 time -1 04EB: AS_actor -1 crouch 1 0616: define_AS_pack_end 4@ 0618: assign_actor $PLAYER_ACTOR to_AS_pack 4@ 061B: remove_references_to_AS_pack 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "COLT45" jump @NONAME_2 end if and 3@ == 1000.0 not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_action_sequences 4@ 0605: actor -1 perform_animation_sequence "COLT45_RELOAD" from_file "COLT45" 4.0 loop 0 0 0 0 -1 0605: actor -1 perform_animation_sequence "COLT45_RELOAD" from_file "COLT45" 4.0 loop 0 0 0 0 -1 0616: define_action_sequences_end 4@ 0618: assign_actor $PLAYER_ACTOR to_action_sequences 4@ 061B: remove_references_to_action_sequences 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 2000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "COLT45" jump @NONAME_2 end if and 3@ < 1000.0 not 1@ == 0 0AB0: key_pressed 82 jf @NONAME_2 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0605: actor $PLAYER_ACTOR perform_animation_sequence "COLT45_RELOAD" IFP_file "COLT45" 4.0 loop 0 0 0 0 time -1 // versionA 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "COLT45" jump @NONAME_2 :NONAME_426 if 84EE: not animation "SILENCED" loaded jf @NONAME_468 04ED: load_animation "SILENCED" jump @NONAME_468 :NONAME_468 wait 0 041A: 1@ = actor $PLAYER_ACTOR weapon 2@ ammo repeat wait 0 until 04EE: animation "SILENCED" loaded if and 0597: actor $PLAYER_ACTOR crouching not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_AS_pack_begin 4@ 0605: actor -1 perform_animation_sequence "CrouchReload" IFP_file "SILENCED" 4.0 loop 0 0 0 1 time -1 04EB: AS_actor -1 crouch 1 0616: define_AS_pack_end 4@ 0618: assign_actor $PLAYER_ACTOR to_AS_pack 4@ 061B: remove_references_to_AS_pack 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "SILENCED" jump @NONAME_2 end if and not 1@ == 0 0AB0: key_pressed 82 jf @NONAME_2 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0605: actor $PLAYER_ACTOR perform_animation_sequence "SILENCE_RELOAD" IFP_file "SILENCED" 4.0 loop 0 0 0 0 time -1 // versionA 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "SILENCED" jump @NONAME_2 :NONAME_622 if 84EE: not animation "PYTHON" loaded jf @NONAME_660 04ED: load_animation "PYTHON" jump @NONAME_660 :NONAME_660 wait 0 041A: 1@ = actor $PLAYER_ACTOR weapon 2@ ammo repeat wait 0 until 04EE: animation "PYTHON" loaded if and 0597: actor $PLAYER_ACTOR crouching not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_AS_pack_begin 4@ 0605: actor -1 perform_animation_sequence "python_crouchreload" IFP_file "PYTHON" 4.0 loop 0 0 0 1 time -1 04EB: AS_actor -1 crouch 1 0616: define_AS_pack_end 4@ 0618: assign_actor $PLAYER_ACTOR to_AS_pack 4@ 061B: remove_references_to_AS_pack 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "PYTHON" jump @NONAME_2 end if and not 1@ == 0 0AB0: key_pressed 82 jf @NONAME_2 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0605: actor $PLAYER_ACTOR perform_animation_sequence "PYTHON_RELOAD" IFP_file "PYTHON" 4.0 loop 0 0 0 0 time -1 // versionA 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "PYTHON" jump @NONAME_2 :NONAME_809 if 84EE: not animation "RIFLE" loaded jf @NONAME_845 04ED: load_animation "RIFLE" jump @NONAME_845 :NONAME_845 wait 0 041A: 1@ = actor $PLAYER_ACTOR weapon 2@ ammo repeat wait 0 until 04EE: animation "RIFLE" loaded if and 0597: actor $PLAYER_ACTOR crouching not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_AS_pack_begin 4@ 0605: actor -1 perform_animation_sequence "RIFLE_crouchload" IFP_file "RIFLE" 4.0 loop 0 0 0 1 time -1 04EB: AS_actor -1 crouch 1 0616: define_AS_pack_end 4@ 0618: assign_actor $PLAYER_ACTOR to_AS_pack 4@ 061B: remove_references_to_AS_pack 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "RIFLE" jump @NONAME_2 end if and not 1@ == 0 0AB0: key_pressed 82 jf @NONAME_2 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0605: actor $PLAYER_ACTOR perform_animation_sequence "RIFLE_LOAD" IFP_file "RIFLE" 4.0 loop 0 0 0 0 time -1 // versionA 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "RIFLE" jump @NONAME_2 :NONAME_989 if 84EE: not animation "UZI" loaded jf @NONAME_1021 04ED: load_animation "UZI" jump @NONAME_1021 :NONAME_1021 wait 0 041A: 1@ = actor $PLAYER_ACTOR weapon 2@ ammo repeat wait 0 until 04EE: animation "UZI" loaded if and 0597: actor $PLAYER_ACTOR crouching not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_AS_pack_begin 4@ 0605: actor -1 perform_animation_sequence "UZI_crouchreload" IFP_file "UZI" 4.0 loop 0 0 0 1 time -1 04EB: AS_actor -1 crouch 1 0616: define_AS_pack_end 4@ 0618: assign_actor $PLAYER_ACTOR to_AS_pack 4@ 061B: remove_references_to_AS_pack 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "UZI" jump @NONAME_2 end if and not 1@ == 0 0AB0: key_pressed 82 jf @NONAME_2 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0605: actor $PLAYER_ACTOR perform_animation_sequence "UZI_RELOAD" IFP_file "UZI" 4.0 loop 0 0 0 0 time -1 // versionA 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "UZI" jump @NONAME_2 :NONAME_1161 if 84EE: not animation "COLT45" loaded jf @NONAME_1199 04ED: load_animation "COLT45" jump @NONAME_1199 :NONAME_1199 wait 0 041A: 1@ = actor $PLAYER_ACTOR weapon 2@ ammo 0653: 3@ = float_stat 73 repeat wait 0 until 04EE: animation "COLT45" loaded if and 3@ == 1000.0 not 1@ == 0 0AB0: key_pressed 82 then 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0615: define_action_sequences 4@ 0605: actor -1 perform_animation_sequence "SAWNOFF_RELOAD" from_file "COLT45" 4.0 loop 0 0 0 0 -1 0605: actor -1 perform_animation_sequence "SAWNOFF_RELOAD" from_file "COLT45" 4.0 loop 0 0 0 0 -1 0616: define_action_sequences_end 4@ 0618: assign_actor $PLAYER_ACTOR to_action_sequences 4@ 061B: remove_references_to_action_sequences 4@ 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 2000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "COLT45" jump @NONAME_2 end if 04EE: animation "COLT45" loaded jf @NONAME_1161 if and not 1@ == 0 0AB0: key_pressed 82 jf @NONAME_2 0992: set_player $PLAYER_CHAR weapons_scrollable 0 01B4: set_player $PLAYER_CHAR can_move 0 wait 200 1@ *= -1 0605: actor $PLAYER_ACTOR perform_animation_sequence "SAWNOFF_RELOAD" IFP_file "COLT45" 4.0 loop 0 0 0 0 time -1 // versionA 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this 1@ *= -1 01B2: give_actor $PLAYER_ACTOR weapon 2@ ammo 1@ // Load the weapon model before using this wait 1000 0992: set_player $PLAYER_CHAR weapons_scrollable 1 01B4: set_player $PLAYER_CHAR can_move 1 04EF: release_animation "COLT45" jump @NONAME_2
в общем куча багов
1)перезарядка только стоя. Пробовал ставить анимацию сидя, но выполнив, сиджей все равно встает - как исправить не знаю
2)не нашел опкода на проверку какого-нибудь стата, чтобы, например, на уровне оружия киллер перезаряжались 2 пистолета, а не один
3)не могу выгрузить файлы анимаций - игра вылетает, максимум что смог сделать, чтоб загружался только один анимационный файл проверкой на загруженность
84EE: not animation "COLT45" loaded
Last edited by Alien (19-10-2008 12:27)
Offline
@Alien -
1) используй сидячии анимации (colt45_crouchreload, UZI_crouchreload и т.д.)
2)
0652: $STAT_UNLOCKED_CITIES_NUMBER = integer_stat 181 0653: $STAT_FAT = float_stat 21
3)
04EF: release_animation "LOWRIDER"
Offline
@Alien -
1) используй сидячии анимации (colt45_crouchreload, UZI_crouchreload и т.д.)2)
0652: $STAT_UNLOCKED_CITIES_NUMBER = integer_stat 181 0653: $STAT_FAT = float_stat 213)
04EF: release_animation "LOWRIDER"
1)после выполнения этих анимаций сиджей все равно встает
2) ща проверю=)
3)говорю же вылетает, если поставить выгрузку анимаций... В принципе, думаю, кажется, может быть, можно оставить все как есть - не так уж много они весят, эти ifp-файлы
Last edited by Alien (18-10-2008 08:31)
Offline
скрипт откорректировал: бага под номером 2 больше нет:D
баг под номером 3 исчез сам собой - я наверно раньше что-то не то делал=)
Last edited by Alien (18-10-2008 09:28)
Offline
после выполнения этих анимаций сиджей все равно встает
{$CLEO} 32@ = 0 while true wait 0 if Player.Defined($PLAYER_CHAR) then if and 32@ >= 250 0AB0: key_pressed 0x73 then 32@ = 0 04ED: load_animation "colt45" while 84EE: not animation "colt45" loaded wait 0 end 0605: actor $PLAYER_ACTOR perform_animation_sequence "colt45_crouchreload" IFP_file "colt45" 4.0 loop 0 0 0 1 time -1 // versionA 04EF: release_animation "colt45" end end end
0605: actor $PLAYER_ACTOR perform_animation_sequence "colt45_crouchreload" IFP_file "colt45" 4.0 loop 0 0 0 1 time -1 // versionA
Смотри предпоследний параметр.
Offline
ля=)
а теперь он выполнив анимацию не встает, он вообще не может двигаться:cry:
я эти флаги уже менял, так ниче и не вышло...=(
Offline
Попробуй так:
{$CLEO} 32@ = 0 while true wait 0 if Player.Defined($PLAYER_CHAR) then if and 32@ >= 250 0AB0: key_pressed 0x73 then 32@ = 0 04ED: load_animation "colt45" while 84EE: not animation "colt45" loaded wait 0 end 0615: define_AS_pack_begin 1@ 0605: actor -1 perform_animation_sequence "colt45_crouchreload" IFP_file "colt45" 4.0 loop 0 0 0 1 time -1 // versionA 04EB: AS_actor -1 crouch 1 0616: define_AS_pack_end 1@ 0618: assign_actor $PLAYER_ACTOR to_AS_pack 1@ 061B: remove_references_to_AS_pack 1@ 04EF: release_animation "colt45" end end end
Offline
Ура! сработало..:^
спасибо:clap:, щас подправлю...;-)
Offline
Pages: 1