Megadreams Geplaatst: 26 juni 2009 Rapport Geplaatst: 26 juni 2009 (bewerkt) Ik heb een script alles gaat perfect ik las een topic waar iemand een missie maakte met meerdere actors ik maakte ook al zoeits maar dat zag er beter uit dus die check van actors dead nam ik over maar ik veranderde nog wat voor een tweede deel, maar nu alles hij de 2 mannetjes spawnt keert hij terug naar het begin, de marker spawnt weer dus, jij ook (er zijn dan 2 cj's), en als je in die marker gaat staan zijn er weer extra mannetjes + een cj want hij begint weer opnieuw. dit is mijn code: { use macro (Ctrl+J) "headsa" to insert a file header } {$VERSION 3.0.0000} thread 'MAIN' var $PLAYER_CHAR: Player end // var 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time 8 0 04E4: unknown_refresh_game_renderer_at 2478.1031 -1667.7927 Camera.SetAtPos(2478.1031, -1667.7927, 13.3438) $PLAYER_CHAR = Player.Create(#NULL, 2478.1031, -1667.7927, 13.3438) $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR) 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group Camera.SetBehindPlayer set_weather 0 wait 0 ms $PLAYER_CHAR.SetClothes("PLAYER_FACE", "HEAD", Head) $PLAYER_CHAR.SetClothes("JEANSDENIM", "JEANS", Legs) $PLAYER_CHAR.SetClothes("SNEAKERBINCBLK", "SNEAKER", Shoes) $PLAYER_CHAR.SetClothes("VEST", "VEST", Torso) $PLAYER_CHAR.Build $PLAYER_CHAR.CanMove = True fade 1 (out) 0 ms select_interior 0 0629: change_stat 181 (islands unlocked) to 4 016C: restart_if_wasted at 2027.77 -1420.52 15.99 angle 137.0 for_town_number 0 016D: restart_if_busted at 1550.68 -1675.49 14.51 angle 90.0 for_town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here ($ONMISSION) 04AE: $c1x = 2485.1031 // $ = any 04AE: $c1y = -1667.7927 04AE: $c1z = 13.3438 03E6: remove_text_box // put your create_thread commands here // Load models 0247: load_model #BFYST 0247: load_model #male01 0247: load_model #EUROS 0247: load_model #SHAMAL 0247: load_model #rocketla 0247: load_model #desert_eagle 0247: load_model #m4 038B: load_requested_models :MODEL_LOAD 00D6: if or 8248: not model #BFYST available 8248: not model #male01 available 8248: not model #EUROS available 8248: not model #SHAMAL available 8248: not model #rocketla available 8248: not model #desert_eagle available 8248: not model #m4 available 004D: jump_if_false @MODEL_SPAWN 0001: wait 0 ms 0002: jump @MODEL_LOAD :MODEL_SPAWN repeat thread 'MODEL_SPAWN' 02A7: $ICON_SPHERE_CJ = create_icon_marker_and_sphere 15 at $c1x $c1y $c1z repeat wait 0 ms until 00EC: actor $PLAYER_ACTOR 0 near_point $c1x $c1y radius 1.0 1.0 Marker.Disable($ICON_SPHERE_CJ) 00BC: text_highpriority 'KILL' 2000 ms 1 // ~r~Kill that two! wait 2000 ms 00BC: text_highpriority 'KILL_C' 2000 ms 1 // ~y~Be carefull, or they kill you! 10@ = Actor.Create(CIVFEMALE, #BFYST, 2490.1031, -1667.7927, 13.3438 ) 11@ = Actor.Create(CIVFEMALE, #male01, 2485.1031, -1667.7927, 13.3438 ) 0187: $m1 = create_marker_above_actor 10@ 0187: $m2 = create_marker_above_actor 11@ 0165: set_marker $m1 color_to 0 0165: set_marker $m2 color_to 0 01B2: give_actor $PLAYER_ACTOR weapon 35 ammo 10 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 30000 // Load the weapon model before using this 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24 01B2: give_actor 10@ weapon 31 ammo 30000 // Load the weapon model before using this 01B9: set_actor 10@ armed_weapon_to 31 01B2: give_actor 11@ weapon 31 ammo 30000 // Load the weapon model before using this 01B9: set_actor 11@ armed_weapon_to 31 05E2: AS_actor 10@ kill_actor $PLAYER_ACTOR 05E2: AS_actor 11@ kill_actor $PLAYER_ACTOR actor.WeaponAccuracy(10@)= 25 actor.WeaponAccuracy(11@)= 40 actor.Health(10@) = 1000 actor.Health(11@) = 1200 0350: toggle_actor 10@ maintain_position_when_attacked 1 0350: toggle_actor 11@ maintain_position_when_attacked 1 jump @ACTOR_DEAD :ACTOR_DEAD wait 0 ms thread 'ACTOR_DEAD' if and actor.Dead(10@) actor.Dead(11@) jump if false @ACTOR_DEAD jump @CAR_TRIP end_thread :CAR_TRIP thread 'CAR_TRIP' $euros = Car.Create(#EUROS, 2458.2483, -1659.0264, 13.3047) Car.Angle($euros)= 90.0 0674: set_car_model #EUROS numberplate "EGPH" 0249: release_model #EUROS 0186: $m3 = create_marker_above_car $euros 0165: set_marker $m3 color_to 2 end_thread :MISSION_PASSED thread 'MISSION_PASSED' Marker.Disable($m1) Marker.Disable($m2) 0394: play_music 1 01E3: show_text_1number_styled GXT 'M_PASS' number 25000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ Player.Money($PLAYER_CHAR) += 25000 //Hier komt wat je met je actor wilt doen 0249: release_model #BFYST 0249: release_model #rocketla 0249: release_model #desert_eagle 0249: release_model #m4 0249: release_model #BFYST 0249: release_model #male01 wait 0 ms end_thread // 0002: jump @SECOND_PART // IDLE LOOP :leeg wait 500 jump @leeg end_thread :SECOND_PART thread 'SECOND_PART' 03BC: 1 = create_sphere_at 2390.1031 -1667.7927 13.3438 radius 1.0 end_thread :MODEL thread 'MODEL' 014B: $PARKED_RHINO = init_parked_car_generator #RHINO -1 -1 1 alarm 0 door_lock 0 0 10000 at 2435.302 -1671.848 12.8007 angle 90.0 014C: set_parked_car_generator $PARKED_RHINO cars_to_generate_to 101 end_thread EDIT: Even in een codeboxje gezet want anders is het wat te lang. EDIT 2: Extra enters gezet omdat hij anders de layout uitrekte. Bewerkt: 26 juni 2009 door megadreams Reageren
.:TOM:. Geplaatst: 26 juni 2009 Rapport Geplaatst: 26 juni 2009 (bewerkt) Dit zou ik ten eerste zo doen maar dat hoeft niet :MODEL_GET 0247: load_model #BFYST 0247: load_model #male01 0247: load_model #EUROS 0247: load_model #SHAMAL 0247: load_model #rocketla 0247: load_model #desert_eagle 0247: load_model #m4 038B: load_requested_models :MODEL_LOAD wait 0 00D6: if and 0248: model #BFYST available 0248: model #male01 available 0248: model #EUROS available 0248: model #SHAMAL available 0248: model #rocketla available 0248: model #desert_eagle available 0248: model #m4 available 004D: jump_if_false @MODEL_GET Waarom al die repeats en waarom die thread 'MODEL_SPAWN'? En die jump op het einde kan weggelaten worden, het spel gaat automatisch verder naar het volgende stukje. :MODEL_SPAWN 02A7: $ICON_SPHERE_CJ = create_icon_marker_and_sphere 15 at $c1x $c1y $c1z repeat wait 0 ms until 00EC: actor $PLAYER_ACTOR 0 near_point $c1x $c1y radius 1.0 1.0 Marker.Disable($ICON_SPHERE_CJ) 00BC: text_highpriority 'KILL' 2000 ms 1 // ~r~Kill that two! wait 2000 ms 00BC: text_highpriority 'KILL_C' 2000 ms 1 // ~y~Be carefull, or they kill you! 10@ = Actor.Create(CIVFEMALE, #BFYST, 2490.1031, -1667.7927, 13.3438 ) 11@ = Actor.Create(CIVFEMALE, #male01, 2485.1031, -1667.7927, 13.3438 ) 0187: $m1 = create_marker_above_actor 10@ 0187: $m2 = create_marker_above_actor 11@ 0165: set_marker $m1 color_to 0 0165: set_marker $m2 color_to 0 01B2: give_actor $PLAYER_ACTOR weapon 35 ammo 10 //Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 30000 //Load the weapon model before using this 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24 01B2: give_actor 10@ weapon 31 ammo 30000 //Load the weapon model before using this 01B9: set_actor 10@ armed_weapon_to 31 01B2: give_actor 11@ weapon 31 ammo 30000 //Load the weapon model before using this 01B9: set_actor 11@ armed_weapon_to 31 05E2: AS_actor 10@ kill_actor $PLAYER_ACTOR 05E2: AS_actor 11@ kill_actor $PLAYER_ACTOR actor.WeaponAccuracy(10@)= 25 actor.WeaponAccuracy(11@)= 40 actor.Health(10@) = 1000 actor.Health(11@) = 1200 0350: toggle_actor 10@ maintain_position_when_attacked 1 0350: toggle_actor 11@ maintain_position_when_attacked 1 Laat die end_thread eens weg en waarom weer die thread 'ACTOR_DEAD'? :ACTOR_DEAD wait 0 ms if and actor.Dead(10@) actor.Dead(11@) jump if false @ACTOR_DEAD :CAR_TRIP $euros = Car.Create(#EUROS, 2458.2483, -1659.0264, 13.3047) Car.Angle($euros)= 90.0 0674: set_car_model #EUROS numberplate "EGPH" 0249: release_model #EUROS 0186: $m3 = create_marker_above_car $euros 0165: set_marker $m3 color_to 2 :MISSION_PASSED thread 'MISSION_PASSED' Marker.Disable($m1) Marker.Disable($m2) 0394: play_music 1 01E3: show_text_1number_styled GXT 'M_PASS' number 25000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ Player.Money($PLAYER_CHAR) += 25000 //Hier komt wat je met je actor wilt doen 0249: release_model #BFYST 0249: release_model #rocketla 0249: release_model #desert_eagle 0249: release_model #m4 0249: release_model #BFYST 0249: release_model #male01 wait 0 ms end_thread De rest ga ik niet verbeteren aangezien je dat niet nodig hebt nu. Tom PS: Bericht bewerkt aangezien er fouten in zaten. w8 nog even, je probleem is zelfs nog niet opgelost. PS2: Dit gaat men petje te boven xD Het kan niet moeilijk zijn en toch zie ik iets over het hoofd.. Bewerkt: 26 juni 2009 door .:TOM:. Reageren
Megadreams Geplaatst: 26 juni 2009 Auteur Rapport Geplaatst: 26 juni 2009 (bewerkt) Nog steeds is het niet opgelost, ik heb nu: (van de threads hoopte dat dat het zou oplossen wat niet was.) { use macro (Ctrl+J) "headsa" to insert a file header } {$VERSION 3.0.0000} thread 'MAIN' var $PLAYER_CHAR: Player end // var 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time 8 0 04E4: unknown_refresh_game_renderer_at 2478.1031 -1667.7927 Camera.SetAtPos(2478.1031, -1667.7927, 13.3438) $PLAYER_CHAR = Player.Create(#NULL, 2478.1031, -1667.7927, 13.3438) $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR) 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group Camera.SetBehindPlayer set_weather 0 wait 0 ms $PLAYER_CHAR.SetClothes("PLAYER_FACE", "HEAD", Head) $PLAYER_CHAR.SetClothes("JEANSDENIM", "JEANS", Legs) $PLAYER_CHAR.SetClothes("SNEAKERBINCBLK", "SNEAKER", Shoes) $PLAYER_CHAR.SetClothes("VEST", "VEST", Torso) $PLAYER_CHAR.Build $PLAYER_CHAR.CanMove = True fade 1 (out) 0 ms select_interior 0 0629: change_stat 181 (islands unlocked) to 4 016C: restart_if_wasted at 2027.77 -1420.52 15.99 angle 137.0 for_town_number 0 016D: restart_if_busted at 1550.68 -1675.49 14.51 angle 90.0 for_town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here ($ONMISSION) 04AE: $c1x = 2485.1031 // $ = any 04AE: $c1y = -1667.7927 04AE: $c1z = 13.3438 03E6: remove_text_box // put your create_thread commands here // Load models 0247: load_model #BFYST 0247: load_model #male01 0247: load_model #EUROS 0247: load_model #SHAMAL 0247: load_model #rocketla 0247: load_model #desert_eagle 0247: load_model #m4 038B: load_requested_models :MODEL_LOAD 00D6: if and 8248: not model #BFYST available 8248: not model #male01 available 8248: not model #EUROS available 8248: not model #SHAMAL available 8248: not model #rocketla available 8248: not model #desert_eagle available 8248: not model #m4 available 004D: jump_if_false @MODEL_SPAWN 0001: wait 0 ms 0002: jump @MODEL_LOAD :MODEL_SPAWN 02A7: $ICON_SPHERE_CJ = create_icon_marker_and_sphere 15 at $c1x $c1y $c1z repeat wait 0 ms until 00EC: actor $PLAYER_ACTOR 0 near_point $c1x $c1y radius 1.0 1.0 Marker.Disable($ICON_SPHERE_CJ) 00BC: text_highpriority 'KILL' 2000 ms 1 // ~r~Kill that two! wait 2000 ms 00BC: text_highpriority 'KILL_C' 2000 ms 1 // ~y~Be carefull, or they kill you! 10@ = Actor.Create(CIVFEMALE, #BFYST, 2490.1031, -1667.7927, 13.3438 ) 11@ = Actor.Create(CIVFEMALE, #male01, 2485.1031, -1667.7927, 13.3438 ) 0187: $m1 = create_marker_above_actor 10@ 0187: $m2 = create_marker_above_actor 11@ 0165: set_marker $m1 color_to 0 0165: set_marker $m2 color_to 0 01B2: give_actor $PLAYER_ACTOR weapon 35 ammo 10 // Load the weapon model before using this 01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 30000 // Load the weapon model before using this 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24 01B2: give_actor 10@ weapon 31 ammo 30000 // Load the weapon model before using this 01B9: set_actor 10@ armed_weapon_to 31 01B2: give_actor 11@ weapon 31 ammo 30000 // Load the weapon model before using this 01B9: set_actor 11@ armed_weapon_to 31 05E2: AS_actor 10@ kill_actor $PLAYER_ACTOR 05E2: AS_actor 11@ kill_actor $PLAYER_ACTOR actor.WeaponAccuracy(10@)= 25 actor.WeaponAccuracy(11@)= 40 actor.Health(10@) = 1000 actor.Health(11@) = 1200 0350: toggle_actor 10@ maintain_position_when_attacked 1 0350: toggle_actor 11@ maintain_position_when_attacked 1 :ACTOR_DEAD wait 0 ms thread 'ACTOR_DEAD' if and actor.Dead(10@) actor.Dead(11@) jump if false @ACTOR_DEAD jump @CAR_TRIP :CAR_TRIP thread 'CAR_TRIP' $euros = Car.Create(#EUROS, 2458.2483, -1659.0264, 13.3047) Car.Angle($euros)= 90.0 0674: set_car_model #EUROS numberplate "EGPH" 0249: release_model #EUROS 0186: $m3 = create_marker_above_car $euros 0165: set_marker $m3 color_to 2 :MISSION_PASSED thread 'MISSION_PASSED' Marker.Disable($m1) Marker.Disable($m2) 0394: play_music 1 01E3: show_text_1number_styled GXT 'M_PASS' number 25000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ Player.Money($PLAYER_CHAR) += 25000 //Hier komt wat je met je actor wilt doen 0249: release_model #BFYST 0249: release_model #rocketla 0249: release_model #desert_eagle 0249: release_model #m4 0249: release_model #BFYST 0249: release_model #male01 wait 0 ms // 0002: jump @SECOND_PART // IDLE LOOP :leeg wait 500 jump @leeg end_thread :SECOND_PART thread 'SECOND_PART' 03BC: 1 = create_sphere_at 2390.1031 -1667.7927 13.3438 radius 1.0 end_thread :MODEL thread 'MODEL' 014B: $PARKED_RHINO = init_parked_car_generator #RHINO -1 -1 1 alarm 0 door_lock 0 0 10000 at 2435.302 -1671.848 12.8007 angle 90.0 014C: set_parked_car_generator $PARKED_RHINO cars_to_generate_to 101 end_thread EDIT: Ik heb ondervonden wat de fout is: het staat in dit stukje: :ACTOR_DEAD thread 'ACTOR_DEAD' if and actor.Dead(10@) actor.Dead(11@) jump if false @ACTOR_DEAD wait 0 ms jump @CAR_TRIP zie het stukje in het rood voor het exacte deel. EDIT: Fout gevonden, bij jump if false en jump gebruik ik namelijk geen opcode (waarom gaf sannybuilder dan geen error??), maar goed had er toch al iets anders neergezet het is trouwens een test missie ik ben van plan mijn dyom missie 'cops' te scripten met wat meer functies zoals een aankomende rijdende auto. EDIT 2: Laat maar heb de fout nu wel niet maar sannybuilder verpestte hem een tijd erna toch xd maar nu lukt alles beter en komt dit probleem niet meer terug. Bewerkt: 21 juli 2009 door megadreams Reageren
Recommended Posts
Een reactie plaatsen
Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.