Napisano dnia: 2009-06-17 11:12:17
Drodzy użytkownicy. Otóż zacząłem tworzyć misję i mam pytanie. Oczywiście przeczytałem lekturę z tej strony, lecz nie wiem w czym rzecz... Przejdę do sedna sprawy. Otóż wkleiłem jedną misje z tej strony i chciałem (tak dla treningu) zrobić jeszcze raz tą misję z lekkimi korektywami.
Połączyłem te dwie misję (jak łatwo zobaczyć są takie same i chciałem zobaczyć, jak to będzie wyglądało. Gdy ostatecznie zabijam ofiarę w pierwszej misji "Misja" automatycznie wyskakuje błąd. Przypominam, że jestem nowy. A i jeszcze jedna rzecz, o której warto wspomnieć. Otóż gdy chce dodać, by sprawdzało, czy gracz jest w wyznaczonym miejscu i stoi (nieruchomo) automatycznie kompilator usuwał napis stopped_on_foot i zamienia go na in_car. Usunąłem samochód, by po prostu można było do tej sfery dojść. Mam na dzieje, że pomożecie :D Pozdrowienia.
Kod:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
DEFINE OBJECTS 1
DEFINE OBJECT SANNY BUILDER 3.04
DEFINE MISSIONS 2
DEFINE MISSION 0 AT @MISJA // Initial 1
DEFINE MISSION 1 AT @DEAD // Initial 2
DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script
DEFINE UNKNOWN_EMPTY_SEGMENT 0
DEFINE UNKNOWN_THREADS_MEMORY 0
{$VERSION 3.1.0027}
//-------------MAIN---------------
thread 'MAIN'
set_weather 3
00C0: set_current_time_hours_to 21 minutes_to 0
01F0: set_max_wanted_level_to 6
$PLAYER_CHAR = Player.Create(#NULL, 0.0, 0.0, 0.0)
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)
Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)
Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)
Player.Build($PLAYER_CHAR)
Player.CanMove($PLAYER_CHAR) = True
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
fade 1 0
start_mission 0 // Initial 1
end_thread
//-------------Mission 0---------------
// Originally: Initial 1
:MISJA
thread 'MISJA'
Model.Load(#SHMYCR)
Model.Load(#WMYCLOT)
Model.Load(#GREENWOO)
Model.Load(#MICRO_UZI)
Model.Load(#MP5LNG)
Model.Load(#TEC9)
038B: load_requested_models
$WOZ = Car.Create(#GREENWOO, 2288.79, -1673.199, 14.3883)
Car.Angle($WOZ) = 358.2751
0229: set_car $WOZ primary_color_to 2 secondary_color_to 1
072A: put_actor $PLAYER_ACTOR into_car $WOZ driverseat
$CEL = Marker.CreateIconAndSphere(56, 2485.974, -1670.766, 13.0223)
054C: use_GXT_table 'POWROT'
00BC: show_text_highpriority GXT 'TXT1' time 10000 flag 1
:MISJA_142
wait 10
if
0103: actor $PLAYER_ACTOR in_sphere 2485.974 -1670.766 13.0223 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
else_jump @MISJA_142
Player.CanMove($PLAYER_CHAR) = False
fade 0 1000
wait 1000
Marker.Disable($CEL)
$OFIARA = Actor.Create(Criminal, #SHMYCR, 2496.866, -1643.766, 13.7826)
$KOLEGA = Actor.Create(CivMale, #WMYCLOT, 2498.976, -1643.547, 13.7826)
01B2: give_actor $OFIARA weapon 26 ammo 20 // Load the weapon model before using this
0639: AS_actor $OFIARA rotate_to_actor $KOLEGA
0639: AS_actor $KOLEGA rotate_to_actor $OFIARA
0605: actor $OFIARA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
0605: actor $KOLEGA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
032B: $UZI = create_weapon_pickup #MICRO_UZI group 5 ammo 50 at 2489.812 -1663.398 13.3359
032B: $MP5 = create_weapon_pickup #MP5LNG group 5 ammo 30 at 2488.254 -1663.246 13.3359
032B: $TEC9 = create_weapon_pickup #TEC9 group 5 ammo 50 at 2486.949 -1662.613 13.3359
$CEL2 = Marker.CreateAboveActor($OFIARA)
02A3: enable_widescreen 1
fade 1 1000
Camera.SetPosition(2489.774, -1655.042, 13.3536, 0.0, 0.0, 0.0)
Camera.OnVehicle($WOZ, 15, 2)
00BC: show_text_highpriority GXT 'TXT2' time 10000 flag 1
wait 10000
Camera.SetPosition(2497.218, -1649.142, 14.5602, 0.0, 0.0, 0.0)
Camera.OnPed($OFIARA, 15, 2)
00BC: show_text_highpriority GXT 'TXT3' time 10000 flag 1
wait 10000
02A3: enable_widescreen 0
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore
:MISJA_602
wait 10
if
02E0: actor $PLAYER_ACTOR aggressive
else_jump @MISJA_637
01B9: set_actor $OFIARA armed_weapon_to 26
05E2: AS_actor $OFIARA kill_actor $PLAYER_ACTOR
:MISJA_637
wait 10
if
Actor.Dead($PLAYER_ACTOR)
else_jump @MISJA_717
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
Marker.Disable($CEL)
Marker.Disable($CEL2)
Car.Destroy($WOZ)
Actor.DestroyInstantly($OFIARA)
Actor.DestroyInstantly($KOLEGA)
Pickup.Destroy($UZI)
Pickup.Destroy($MP5)
Pickup.Destroy($TEC9)
start_mission 0 // Initial 1
:MISJA_717
wait 10
if
Actor.Dead($OFIARA)
else_jump @MISJA_602
01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 100
0394: play_music 1
Marker.Disable($CEL2)
start_mission 1 // Initial 2
end_thread
//-------------Mission 1---------------
// Originally: Initial 2
:DEAD
thread 'DEAD'
Model.Load(#SHMYCR)
Model.Load(#WMYCLOT)
Model.Load(#MICRO_UZI)
Model.Load(#MP5LNG)
Model.Load(#TEC9)
038B: load_requested_models
$CEL = Marker.CreateIconAndSphere(56, 2485.974, -1670.766, 13.0223)
054C: use_GXT_table 'POWROT'
00BC: show_text_highpriority GXT 'TXT1' time 10000 flag 1
:DEAD_87
wait 10
if
0103: actor $PLAYER_ACTOR in_sphere 2485.974 -1670.766 13.0223 radius 2.0 2.0 2.0 sphere 1 stopped_in_car // chce miec stopped_on_foot a nie moge :D
else_jump @DEAD_87
Player.CanMove($PLAYER_CHAR) = False
fade 0 1000
wait 1000
Marker.Disable($CEL)
$OFIARA = Actor.Create(Criminal, #SHMYCR, 2496.866, -1643.766, 13.7826)
$KOLEGA = Actor.Create(CivMale, #WMYCLOT, 2498.976, -1643.547, 13.7826)
01B2: give_actor $OFIARA weapon 26 ammo 20 // Load the weapon model before using this
0639: AS_actor $OFIARA rotate_to_actor $KOLEGA
0639: AS_actor $KOLEGA rotate_to_actor $OFIARA
0605: actor $OFIARA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
0605: actor $KOLEGA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
032B: $UZI = create_weapon_pickup #MICRO_UZI group 5 ammo 50 at 2489.812 -1663.398 13.3359
032B: $MP5 = create_weapon_pickup #MP5LNG group 5 ammo 30 at 2488.254 -1663.246 13.3359
032B: $TEC9 = create_weapon_pickup #TEC9 group 5 ammo 50 at 2486.949 -1662.613 13.3359
$CEL2 = Marker.CreateAboveActor($OFIARA)
02A3: enable_widescreen 1
fade 1 1000
Camera.SetPosition(2489.774, -1655.042, 13.3536, 0.0, 0.0, 0.0)
Camera.OnPed($PLAYER_ACTOR, 15, 2)
00BC: show_text_highpriority GXT 'TXT2' time 10000 flag 1
wait 10000
Camera.SetPosition(2497.218, -1649.142, 14.5602, 0.0, 0.0, 0.0)
Camera.OnPed($OFIARA, 15, 2)
00BC: show_text_highpriority GXT 'TXT3' time 10000 flag 1
wait 10000
02A3: enable_widescreen 0
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore
:DEAD_547
wait 10
if
02E0: actor $PLAYER_ACTOR aggressive
else_jump @DEAD_582
01B9: set_actor $OFIARA armed_weapon_to 26
05E2: AS_actor $OFIARA kill_actor $PLAYER_ACTOR
:DEAD_582
wait 10
if
Actor.Dead($PLAYER_ACTOR)
else_jump @DEAD_662
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
Marker.Disable($CEL)
Marker.Disable($CEL2)
Actor.DestroyInstantly($OFIARA)
Actor.DestroyInstantly($KOLEGA)
Pickup.Destroy($UZI)
Pickup.Destroy($MP5)
Pickup.Destroy($TEC9)
start_mission 0 // Initial 1
:DEAD_662
wait 10
if
Actor.Dead($OFIARA)
else_jump @DEAD_547
01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 100
0394: play_music 1
Marker.Disable($CEL2)
end_thread
DEFINE OBJECTS 1
DEFINE OBJECT SANNY BUILDER 3.04
DEFINE MISSIONS 2
DEFINE MISSION 0 AT @MISJA // Initial 1
DEFINE MISSION 1 AT @DEAD // Initial 2
DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script
DEFINE UNKNOWN_EMPTY_SEGMENT 0
DEFINE UNKNOWN_THREADS_MEMORY 0
{$VERSION 3.1.0027}
//-------------MAIN---------------
thread 'MAIN'
set_weather 3
00C0: set_current_time_hours_to 21 minutes_to 0
01F0: set_max_wanted_level_to 6
$PLAYER_CHAR = Player.Create(#NULL, 0.0, 0.0, 0.0)
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)
Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)
Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)
Player.Build($PLAYER_CHAR)
Player.CanMove($PLAYER_CHAR) = True
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
fade 1 0
start_mission 0 // Initial 1
end_thread
//-------------Mission 0---------------
// Originally: Initial 1
:MISJA
thread 'MISJA'
Model.Load(#SHMYCR)
Model.Load(#WMYCLOT)
Model.Load(#GREENWOO)
Model.Load(#MICRO_UZI)
Model.Load(#MP5LNG)
Model.Load(#TEC9)
038B: load_requested_models
$WOZ = Car.Create(#GREENWOO, 2288.79, -1673.199, 14.3883)
Car.Angle($WOZ) = 358.2751
0229: set_car $WOZ primary_color_to 2 secondary_color_to 1
072A: put_actor $PLAYER_ACTOR into_car $WOZ driverseat
$CEL = Marker.CreateIconAndSphere(56, 2485.974, -1670.766, 13.0223)
054C: use_GXT_table 'POWROT'
00BC: show_text_highpriority GXT 'TXT1' time 10000 flag 1
:MISJA_142
wait 10
if
0103: actor $PLAYER_ACTOR in_sphere 2485.974 -1670.766 13.0223 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
else_jump @MISJA_142
Player.CanMove($PLAYER_CHAR) = False
fade 0 1000
wait 1000
Marker.Disable($CEL)
$OFIARA = Actor.Create(Criminal, #SHMYCR, 2496.866, -1643.766, 13.7826)
$KOLEGA = Actor.Create(CivMale, #WMYCLOT, 2498.976, -1643.547, 13.7826)
01B2: give_actor $OFIARA weapon 26 ammo 20 // Load the weapon model before using this
0639: AS_actor $OFIARA rotate_to_actor $KOLEGA
0639: AS_actor $KOLEGA rotate_to_actor $OFIARA
0605: actor $OFIARA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
0605: actor $KOLEGA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
032B: $UZI = create_weapon_pickup #MICRO_UZI group 5 ammo 50 at 2489.812 -1663.398 13.3359
032B: $MP5 = create_weapon_pickup #MP5LNG group 5 ammo 30 at 2488.254 -1663.246 13.3359
032B: $TEC9 = create_weapon_pickup #TEC9 group 5 ammo 50 at 2486.949 -1662.613 13.3359
$CEL2 = Marker.CreateAboveActor($OFIARA)
02A3: enable_widescreen 1
fade 1 1000
Camera.SetPosition(2489.774, -1655.042, 13.3536, 0.0, 0.0, 0.0)
Camera.OnVehicle($WOZ, 15, 2)
00BC: show_text_highpriority GXT 'TXT2' time 10000 flag 1
wait 10000
Camera.SetPosition(2497.218, -1649.142, 14.5602, 0.0, 0.0, 0.0)
Camera.OnPed($OFIARA, 15, 2)
00BC: show_text_highpriority GXT 'TXT3' time 10000 flag 1
wait 10000
02A3: enable_widescreen 0
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore
:MISJA_602
wait 10
if
02E0: actor $PLAYER_ACTOR aggressive
else_jump @MISJA_637
01B9: set_actor $OFIARA armed_weapon_to 26
05E2: AS_actor $OFIARA kill_actor $PLAYER_ACTOR
:MISJA_637
wait 10
if
Actor.Dead($PLAYER_ACTOR)
else_jump @MISJA_717
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
Marker.Disable($CEL)
Marker.Disable($CEL2)
Car.Destroy($WOZ)
Actor.DestroyInstantly($OFIARA)
Actor.DestroyInstantly($KOLEGA)
Pickup.Destroy($UZI)
Pickup.Destroy($MP5)
Pickup.Destroy($TEC9)
start_mission 0 // Initial 1
:MISJA_717
wait 10
if
Actor.Dead($OFIARA)
else_jump @MISJA_602
01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 100
0394: play_music 1
Marker.Disable($CEL2)
start_mission 1 // Initial 2
end_thread
//-------------Mission 1---------------
// Originally: Initial 2
:DEAD
thread 'DEAD'
Model.Load(#SHMYCR)
Model.Load(#WMYCLOT)
Model.Load(#MICRO_UZI)
Model.Load(#MP5LNG)
Model.Load(#TEC9)
038B: load_requested_models
$CEL = Marker.CreateIconAndSphere(56, 2485.974, -1670.766, 13.0223)
054C: use_GXT_table 'POWROT'
00BC: show_text_highpriority GXT 'TXT1' time 10000 flag 1
:DEAD_87
wait 10
if
0103: actor $PLAYER_ACTOR in_sphere 2485.974 -1670.766 13.0223 radius 2.0 2.0 2.0 sphere 1 stopped_in_car // chce miec stopped_on_foot a nie moge :D
else_jump @DEAD_87
Player.CanMove($PLAYER_CHAR) = False
fade 0 1000
wait 1000
Marker.Disable($CEL)
$OFIARA = Actor.Create(Criminal, #SHMYCR, 2496.866, -1643.766, 13.7826)
$KOLEGA = Actor.Create(CivMale, #WMYCLOT, 2498.976, -1643.547, 13.7826)
01B2: give_actor $OFIARA weapon 26 ammo 20 // Load the weapon model before using this
0639: AS_actor $OFIARA rotate_to_actor $KOLEGA
0639: AS_actor $KOLEGA rotate_to_actor $OFIARA
0605: actor $OFIARA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
0605: actor $KOLEGA perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
032B: $UZI = create_weapon_pickup #MICRO_UZI group 5 ammo 50 at 2489.812 -1663.398 13.3359
032B: $MP5 = create_weapon_pickup #MP5LNG group 5 ammo 30 at 2488.254 -1663.246 13.3359
032B: $TEC9 = create_weapon_pickup #TEC9 group 5 ammo 50 at 2486.949 -1662.613 13.3359
$CEL2 = Marker.CreateAboveActor($OFIARA)
02A3: enable_widescreen 1
fade 1 1000
Camera.SetPosition(2489.774, -1655.042, 13.3536, 0.0, 0.0, 0.0)
Camera.OnPed($PLAYER_ACTOR, 15, 2)
00BC: show_text_highpriority GXT 'TXT2' time 10000 flag 1
wait 10000
Camera.SetPosition(2497.218, -1649.142, 14.5602, 0.0, 0.0, 0.0)
Camera.OnPed($OFIARA, 15, 2)
00BC: show_text_highpriority GXT 'TXT3' time 10000 flag 1
wait 10000
02A3: enable_widescreen 0
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore
:DEAD_547
wait 10
if
02E0: actor $PLAYER_ACTOR aggressive
else_jump @DEAD_582
01B9: set_actor $OFIARA armed_weapon_to 26
05E2: AS_actor $OFIARA kill_actor $PLAYER_ACTOR
:DEAD_582
wait 10
if
Actor.Dead($PLAYER_ACTOR)
else_jump @DEAD_662
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
Marker.Disable($CEL)
Marker.Disable($CEL2)
Actor.DestroyInstantly($OFIARA)
Actor.DestroyInstantly($KOLEGA)
Pickup.Destroy($UZI)
Pickup.Destroy($MP5)
Pickup.Destroy($TEC9)
start_mission 0 // Initial 1
:DEAD_662
wait 10
if
Actor.Dead($OFIARA)
else_jump @DEAD_547
01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 100
0394: play_music 1
Marker.Disable($CEL2)
end_thread
Połączyłem te dwie misję (jak łatwo zobaczyć są takie same i chciałem zobaczyć, jak to będzie wyglądało. Gdy ostatecznie zabijam ofiarę w pierwszej misji "Misja" automatycznie wyskakuje błąd. Przypominam, że jestem nowy. A i jeszcze jedna rzecz, o której warto wspomnieć. Otóż gdy chce dodać, by sprawdzało, czy gracz jest w wyznaczonym miejscu i stoi (nieruchomo) automatycznie kompilator usuwał napis stopped_on_foot i zamienia go na in_car. Usunąłem samochód, by po prostu można było do tej sfery dojść. Mam na dzieje, że pomożecie :D Pozdrowienia.