You are not logged in.
Вопрос таков: есть скрипт, который спавнит педов в рандомных местах с рандомным кол-вом, но мне нужно, что бы они спавнились в промежуток с 21:30 до 04:25.
Как мне это сделать? Какие строки нужно прописать?
Offline
нужно найти где создается пед, что-то вроде:
$actor = actor_create #model at 0 0 0
и завернуть эту команду в условие:
if isNight() then $actor = actor_create #model at 0 0 0 end
где isNight это проверка времени:
:isNight int hours int minutes 00BF: hours = current_time_hours, minutes = current_time_minutes hours *= 60 minutes += hours if or minutes >= 1290 // 21*60 + 30 minutes <= 265 // 4*60 + 25 then end return
Offline
if isNight() then $actor = actor_create #model at 0 0 0 end
Спасибо за помощь, но у меня Sanny Builder пишет: Неизвестная команда isNight().
Если что код не мой, но скрипт содержал исходник, вот он:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013 {$CLEO .cs} //-------------MAIN--------------- 0000: NOP 060A: create_decision_maker_type 5 store_to 31@ // decision\allowed\m_.ped files 0708: reset_decision_maker 31@ event 31 0708: reset_decision_maker 31@ event 36 0708: reset_decision_maker 31@ event 9 0709: set_decision_maker 31@ on_event 36 taskID 1000 respect 0.0 hate 100.0 like 0.0 dislike 0.0 in_car 1 on_foot 1 // see *.ped files 0709: set_decision_maker 31@ on_event 9 taskID 1000 respect 0.0 hate 100.0 like 0.0 dislike 100.0 in_car 1 on_foot 1 // see *.ped files 0709: set_decision_maker 31@ on_event 31 taskID 200 respect 100.0 hate 100.0 like 100.0 dislike 100.0 in_car 1 on_foot 1 // see *.ped files :NONAME_132 wait 0 01F0: set_max_wanted_level_to 0 01EB: set_traffic_density_multiplier_to 0.0 03DE: set_pedestrians_density_multiplier_to 0.0 0923: enable_air_traffic 0 06D7: enable_train_traffic 0 06D0: enable_emergency_traffic 0 if Player.Defined(0) else_jump @NONAME_545 0@ = 0 :NONAME_188 if 13@(0@,12i) == 1 else_jump @NONAME_286 if or Actor.Dead(1@(0@,12i)) 8104: not actor $PLAYER_ACTOR near_actor 1@(0@,12i) radius 150.0 150.0 150.0 sphere 0 else_jump @NONAME_279 Actor.RemoveReferences(1@(0@,12i)) 13@(0@,12i) = 0 :NONAME_279 jump @NONAME_524 :NONAME_286 wait 0 0208: 25@ = random_float_in_ranges -60.0 60.0 0208: 26@ = random_float_in_ranges -60.0 60.0 04C4: store_coords_to 27@ 28@ 29@ from_actor $PLAYER_ACTOR with_offset 25@ 26@ 0.0 092E: get_water_height_at 27@ 28@ ignore_waves 0 store_to 30@ if and 80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere 27@ 28@ 29@ radius 10.0 10.0 10.0 80C2: not sphere_onscreen 27@ 28@ 29@ radius 5.0 not 30@ >= 0.0 else_jump @NONAME_433 jump @NONAME_440 :NONAME_433 jump @NONAME_286 :NONAME_440 0376: 1@(0@,12i) = create_random_actor_at 27@ 28@ -100.0 gosub @NONAME_552 0489: set_actor 1@(0@,12i) muted 1 060B: set_actor 1@(0@,12i) decision_maker_to 31@ 05E2: AS_actor 1@(0@,12i) kill_actor $PLAYER_ACTOR 13@(0@,12i) = 1 :NONAME_524 0@ += 1 0@ > 11 else_jump @NONAME_188 :NONAME_545 jump @NONAME_132 :NONAME_552 0209: 27@ = random_int_in_ranges 0 3 if 27@ == 0 else_jump @NONAME_603 Actor.SetWalkStyle(1@(0@,12i), "OLDMAN") jump @NONAME_688 :NONAME_603 if 27@ == 1 else_jump @NONAME_648 Actor.SetWalkStyle(1@(0@,12i), "OLDFATMAN") jump @NONAME_688 :NONAME_648 if 27@ == 2 else_jump @NONAME_688 Actor.SetWalkStyle(1@(0@,12i), "OLDFATWOMAN") :NONAME_688 return
Offline
Обнови Sanny Builder или замени IsNight() на gosub @IsNight
Offline