08 июня 2011

Стационарный пулемет

Этот скрипт создает пулемет на ограждении, за которым Вы будете стоять и стрелять из минигана. Чтобы включить скрипт, нажмите T(англ.). Для выхода нажмите Войти в машину.

:Pulemet
wait 10
if and
player.Defined($PLAYER_CHAR)
not actor.Dead($PLAYER_ACTOR)
not actor.Driving($PLAYER_ACTOR)
8A0C: not player $PLAYER_CHAR on_jetpack
0AB0: key_pressed 0x54
jf @Pulemet
wait 10
model.Load(1422)
model.Load(#MINIGUN)
038B: load_requested_models

:Pulemet2
wait 10
actor.StorePos($PLAYER_ACTOR,1@,2@,3@)
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 -0.5
if and
model.Available(1422)
model.Available(#MINIGUN)
06BD: no_obstacles_between 1@ 2@ 3@ and 4@ 5@ 6@ solid 1 car 1 actor 1 object 1 particle 0
jf @Pulemet2
fade 0 150
wait 160
object.Create(7@,1422,4@,5@,6@)
07F7: set_object 7@ indestructible 1
Object.SetImmunities(7@,1,1,1,1,1)
01B2: give_actor $PLAYER_ACTOR weapon 38 ammo 99999 // Load the weapon model before using this
04F4: put_actor $PLAYER_ACTOR into_turret_on_object 7@ offset_from_object_origin 0.0 -0.2 0.2 orientation 0 both_side_angle_limit 360.0 lock_weapon 38
wait 160
fade 1 150
jump to @Pulemet3

:Pulemet3
wait 0
if or
actor.Dead($PLAYER_ACTOR)
0741: actor $PLAYER_ACTOR busted
00E1: player 0 pressed_key 15
jf @Pulemet3
fade 0 150
wait 160
0465: remove_actor $PLAYER_ACTOR from_turret_mode
object.Destroy(7@)
object.RemoveReferences(7@)
0555: remove_weapon 38 from_actor $PLAYER_ACTOR
model.Destroy(#MINIGUN)
model.Destroy(1422)
wait 160
fade 1 150
jump to @Pulemet

Комментариев нет: