You are not logged in.
Pages: 1
Мне очень нужна помощь. Запускаю скрипт, вижу Карла и через секунду вылет.
Вот код:
{$CLEO}
//------------- Mission ---------------
wait 0
$ZOMBIES = 1
:Spawn
wait 0
if and
Player.Defined(0)
$ZOMBIES == 1
jf @Spawn
0923: enable_air_traffic 0 
06D7: enable_train_traffic 0 
06D0: enable_emergency_traffic 0 
01EB: set_traffic_density_multiplier_to 0.0 
03DE: set_pedestrians_density_multiplier_to 0.0 
08DD: lose_stuff_after_wasted 0 
072C: generate_police_bikes 0 
099E: enable_police_patrols 0 
wait 0
:SPAWN_ZOMBIES
wait 0
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 0@ = = create_random_actor_at 1@ 2@ -100.0 
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 1@ = = create_random_actor_at 1@ 2@ -100.0 
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 2@ = = create_random_actor_at 1@ 2@ -100.0 
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 3@ = = create_random_actor_at 1@ 2@ -100.0 
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 4@ = = create_random_actor_at 1@ 2@ -100.0 
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 5@ = = create_random_actor_at 1@ 2@ -100.0 
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 6@ = = create_random_actor_at 1@ 2@ -100.0 
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 7@ = = create_random_actor_at 1@ 2@ -100.0 
if and
not actor.Dead(0@)
not actor.Dead(1@)
not actor.Dead(2@)
not actor.Dead(3@)
not actor.Dead(4@)
not actor.Dead(5@)
not actor.Dead(6@)
not actor.Dead(7@)
jump @Spawn
					Offline

попробуй для начала убрать глобальную переменную $ZOMBIES и заменить ее на локальную, например 10@.
далее, установи SCRLog https://www.gtagarage.com/mods/show.php?id=23846 и после вылета посмотри на каком опкоде была ошибка, это должно помочь найти причину
Offline
1) Мне там нужна именно глобальная переменная
2) Проблему решил, появилась новая.
Когда я отхожу от зомби, они не удаляются, а значит и не спавнятся новые. 
Код:
{$CLEO}
//------------- Mission ---------------
wait 0
$ZOMBIES = 1
:Spawn
wait 0
if
Player.Defined(0)
jf @Spawn
0923: enable_air_traffic 0 
06D7: enable_train_traffic 0 
06D0: enable_emergency_traffic 0 
01EB: set_traffic_density_multiplier_to 0.0 
03DE: set_pedestrians_density_multiplier_to 0.0 
08DD: lose_stuff_after_wasted 0 
072C: generate_police_bikes 0 
099E: enable_police_patrols 0 
01F0: set_max_wanted_level_to 0 
wait 100
:SPAWN_ZOMBIES
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 11@ = = create_random_actor_at 1@ 2@ -100.0 
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 12@ = = create_random_actor_at 1@ 2@ -100.0 
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 13@ = = create_random_actor_at 1@ 2@ -100.0 
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 14@ = = create_random_actor_at 1@ 2@ -100.0 
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 15@ = = create_random_actor_at 1@ 2@ -100.0 
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 16@ = = create_random_actor_at 1@ 2@ -100.0 
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 17@ = = create_random_actor_at 1@ 2@ -100.0 
wait 10
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
0376: 18@ = = create_random_actor_at 1@ 2@ -100.0 
Actor.SetWalkStyle(18@, "WOMAN")
Actor.SetWalkStyle(11@, "WOMAN")
Actor.SetWalkStyle(12@, "WOMAN")
Actor.SetWalkStyle(13@, "WOMAN")
Actor.SetWalkStyle(14@, "WOMAN")
Actor.SetWalkStyle(15@, "WOMAN")
Actor.SetWalkStyle(16@, "WOMAN")
Actor.SetWalkStyle(17@, "WOMAN")
05E2: AS_actor 18@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 11@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 12@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 13@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 14@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 15@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 16@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 17@ kill_actor $PLAYER_ACTOR
077A: set_actor 18@ acquaintance 4 to_actors_pedtype 0
077A: set_actor 11@ acquaintance 4 to_actors_pedtype 0
077A: set_actor 12@ acquaintance 4 to_actors_pedtype 0
077A: set_actor 14@ acquaintance 4 to_actors_pedtype 0
077A: set_actor 15@ acquaintance 4 to_actors_pedtype 0
077A: set_actor 16@ acquaintance 4 to_actors_pedtype 0
077A: set_actor 17@ acquaintance 4 to_actors_pedtype 0
Actor.Health(18@) = 1500
Actor.Health(11@) = 150
Actor.Health(12@) = 1000
Actor.Health(13@) = 10
Actor.Health(14@) = 2000
Actor.Health(15@) = 700
Actor.Health(16@) = 110
Actor.Health(17@) = 1900
   
:check
wait 0
if or
actor.Dead(18@)
actor.Dead(11@)
actor.Dead(12@)
actor.Dead(13@)
actor.Dead(14@)
actor.Dead(15@)
actor.Dead(16@)
actor.Dead(17@)
if or
    not actor.Dead(18@)
8104:   actor $PLAYER_ACTOR near_actor 18@ radius 100.0 100.0 100.0 sphere 0 
then
    wait 0
else
    if
        not actor.Dead(18@)
    then
    Actor.DestroyInstantly(18@)
    end
    actor.RemoveReferences(18@)
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 18@ = = create_random_actor_at 1@ 2@ -100.0 
    05E2: AS_actor 18@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(18@, "WOMAN")
    Actor.Health(18@) = 1500
    077A: set_actor 18@ acquaintance 4 to_actors_pedtype 0
end
if or
    not actor.Dead(11@)
8104:   actor $PLAYER_ACTOR near_actor 11@ radius 100.0 100.0 100.0 sphere 0 
then
    wait 0
else
    if
        not actor.Dead(11@)
    then
    Actor.DestroyInstantly(11@)
    end
    actor.RemoveReferences(11@)
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 11@ = = create_random_actor_at 1@ 2@ -100.0 
    05E2: AS_actor 11@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(11@, "WOMAN")
    Actor.Health(11@) = 176
    077A: set_actor 11@ acquaintance 4 to_actors_pedtype 0
end
if or
    not actor.Dead(12@)
    8104:   actor $PLAYER_ACTOR near_actor 12@ radius 100.0 100.0 100.0 sphere 0  
then
    wait 0
else
    if
        not actor.Dead(12@)
    then
    Actor.DestroyInstantly(12@)
    end
    actor.RemoveReferences(12@) 
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 12@ = = create_random_actor_at 1@ 2@ -100.0 
    05E2: AS_actor 12@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(12@, "WOMAN")
    Actor.Health(12@) = 2000
    077A: set_actor 12@ acquaintance 4 to_actors_pedtype 0
end
if or
    not actor.Dead(13@)
    8104:   actor $PLAYER_ACTOR near_actor 13@ radius 100.0 100.0 100.0 sphere 0  
then
    wait 0
else
    if
        not actor.Dead(13@)
    then
    Actor.DestroyInstantly(13@)
    end
    actor.RemoveReferences(13@)
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 13@ = = create_random_actor_at 1@ 2@ -100.0 
    05E2: AS_actor 13@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(13@, "WOMAN")
    Actor.Health(13@) = 500
    077A: set_actor 13@ acquaintance 4 to_actors_pedtype 0
end
if or
    not actor.Dead(14@)
    8104:   actor $PLAYER_ACTOR near_actor 14@ radius 100.0 100.0 100.0 sphere 0 
then
    wait 0
else
    if
        not actor.Dead(14@)
    then
    Actor.DestroyInstantly(14@)
    end
    actor.RemoveReferences(14@)
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 14@ = = create_random_actor_at 1@ 2@ -100.0 
    05E2: AS_actor 14@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(14@, "WOMAN")
    Actor.Health(14@) = 400
    077A: set_actor 14@ acquaintance 4 to_actors_pedtype 0
end
if or
    not actor.Dead(15@)
    8104:   actor $PLAYER_ACTOR near_actor 15@ radius 100.0 100.0 100.0 sphere 0 
then
    wait 0
else
    if
        not actor.Dead(15@)
    then
    Actor.DestroyInstantly(15@)
    end
    actor.RemoveReferences(15@)
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 15@ = = create_random_actor_at 1@ 2@ -100.0 
    05E2: AS_actor 15@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(15@, "WOMAN")
    Actor.Health(15@) = 25
    077A: set_actor 15@ acquaintance 4 to_actors_pedtype 0
end
if or
    not actor.Dead(16@)
    8104:   actor $PLAYER_ACTOR near_actor 16@ radius 100.0 100.0 100.0 sphere 0 
then
    wait 0
else
    if
        not actor.Dead(16@)
    then
    04F7: status_text 33@ 0 line 1 'GXT'
    Actor.DestroyInstantly(16@)
    end
    actor.RemoveReferences(16@)
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 16@ = = create_random_actor_at 1@ 2@ -100.0 
    05E2: AS_actor 16@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(16@, "WOMAN")
    Actor.Health(16@) = 1000
    077A: set_actor 16@ acquaintance 4 to_actors_pedtype 0
end
if or
    not actor.Dead(17@)
    8104:   actor $PLAYER_ACTOR near_actor 17@ radius 100.0 100.0 100.0 sphere 0 
then
    wait 0
else
    if
        not actor.Dead(17@)
    then
    Actor.DestroyInstantly(17@)
    end
    actor.RemoveReferences(17@)
    04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 30.0 30.0 0.0 
    0376: 17@ = = create_random_actor_at 1@ 2@ -100.0
    05E2: AS_actor 17@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(17@, "WOMAN")
    Actor.Health(17@) = 800
    077A: set_actor 17@ acquaintance 4 to_actors_pedtype 0
end
jump @check
Last edited by Red_Ender (29-07-2020 07:54)
Offline
попробуй для начала убрать глобальную переменную $ZOMBIES и заменить ее на локальную, например 10@.
далее, установи SCRLog https://www.gtagarage.com/mods/show.php?id=23846 и после вылета посмотри на каком опкоде была ошибка, это должно помочь найти причину
Но спасибо огромное, скачаю SCRLog.
Offline
Я рад, что CLEO скриптинг не заброшен, а на форумах так быстро отвечают.  
Offline
Хех, решил проблему допольнительной проверкой...
Offline
Pages: 1