Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Rockstar missie hulp.

Hallo, ik ben pas begonnen met leren van SCM-modding. Ik heb de tutorial "Een echte missie (Rockstar style)" gelezen, en aangepast.

Ik heb geprobeerd meerdere targets toe te voegen, spawnen was geen probleem. Maar zodra ik een van de targets vermoorde was de missie al voltooid.

Dit heb ik proberen op te lossen door er dit van te maken:

:MISSION_2
thread 'TUT 2'
gosub @MISSION_2_MAIN
if wasted_or_busted
then
gosub @MISSION_2_FAIL
end
gosub @MISSION_2_CLEANUP
end_thread

//-------------------------------------
:MISSION_2_MAIN
//Load models
model.Load(#m4)
model.Load(#BMYDRUG)
model.Load(#WMYDRUG)
model.Load(#HMYDRUG)
model.Load(#BIKDRUG)
model.Load(#HECK1)
model.Load(#TURISMO)
model.load(#TEC9)
038B: load_requested_models
wait 0 ms
if and
model.Available(#m4)
model.Available(#HECK1)
model.Load(#BMYDRUG)
model.Load(#WMYDRUG)
model.Load(#HMYDRUG)
model.Load(#BIKDRUG)
model.Available(#TURISMO)
004D: jump_if_false @MISSION_2_MAIN


0674: set_car_model #TURISMO numberplate "-COFFEE-"
$car_num = car.Create(#TURISMO, 1716.183, 2774.52, 10.57681)
$victim0 = Actor.Create(CIVMALE, #BIKDRUG, 1726.654, 2773.975, 14.57351)
$victim1 = Actor.Create(CIVMALE, #BMYDRUG, 1711.231, 2771.608, 11.03594)
$victim2 = Actor.Create(CIVMALE, #WMYDRUG, 1721.05, 2778.415, 11.03594)
$victim3 = Actor.Create(CIVMALE, #BIKDRUG, 1720.846, 2773.042, 11.03594)
$victim4 = Actor.Create(CIVMALE, #HMYDRUG, 1716.569, 2777.375, 11.03594)
$innocent0 = Actor.Create(CIVMALE, #HECK1, 1720.272, 2775.302, 11.03594)
0187: $victim_marker = create_marker_above_actor $victim0
0187: $victim_marker1 = create_marker_above_actor $victim1
0187: $victim_marker2 = create_marker_above_actor $victim2
0187: $victim_marker3 = create_marker_above_actor $victim3
0187: $victim_marker4 = create_marker_above_actor $victim4

01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 350 // Load the weapon model before using this
01B2: give_actor $victim0 weapon 372 ammo 100 // Load the weapon model before using this
01B2: give_actor $victim1 weapon 372 ammo 100 // Load the weapon model before using this
01B2: give_actor $victim2 weapon 372 ammo 100 // Load the weapon model before using this
01B2: give_actor $victim3 weapon 372 ammo 100 // Load the weapon model before using this
01B2: give_actor $victim4 weapon 372 ammo 100 // Load the weapon model before using this

repeat
wait 0 ms
if actor.Dead($innocent0)
then
jump @MISSION_2_FAIL
end
until actor.dead($victim0)
jump @MISSION_2_0 

:MISSION_2_0
wait 0 ms
actor.Dead($victim1)
jump @MISSION_2_1

:MISSION_2_1
wait 0 ms
actor.Dead($victim2)
jump @MISSION_2_2

:MISSION_2_2
wait 0 ms
actor.Dead($victim3)
jump @MISSION_2_3

:MISSION_2_3
wait 0 ms
actor.Dead($victim4)

:MISSION_2_PASSED
0394: play_music 1
$MISSIONS_PASSED += 1
Player.Money($PLAYER_CHAR) += 12134
01E3: show_text_1number_styled GXT 'M_PASS' number 12134 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
return

//-------------------------------------
:MISSION_2_FAIL
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
// Hier kun je alles kwijt wat moet gebeuren als de missie gefaald is. Bv. bepaalde dingen weer terugdraaien
0555: remove_weapon 31 from_actor $PLAYER_ACTOR
return

//-------------------------------------
:MISSION_2_CLEANUP
$ONMISSION = 0
// Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen
// En om speciale settings voor deze missie terug te zetten naar normaal
Marker.Disable($victim_marker)
Marker.Disable($victim_marker1)
Marker.Disable($victim_marker2)
Marker.Disable($victim_marker3)
Marker.Disable($victim_marker4)
010D: set_player $PLAYER_CHAR wanted_level_to 0
model.Destroy(#WMYDRUG)
model.Destroy(#BMYDRUG)
model.Destroy(#HMYDRUG)
model.Destroy(#BIKDRUG)
model.Destroy(#HECK1)
mission_cleanup
return

Dit werkt beter, maar als ik "victim4" neerschiet is de missie direct voltooid.

Hoe kan ik dit het beste oplossen?

En de targets staan helemaal niks te doen, (hoe) kan ik de peds laten bewegen. En hoe kan ik ze terug laten schieten?

Featured Replies

:MISSION_2_0
wait 0 ms
actor.Dead($victim1)
jump @MISSION_2_1

:MISSION_2_1
wait 0 ms
actor.Dead($victim2)
jump @MISSION_2_2

:MISSION_2_2
wait 0 ms
actor.Dead($victim3)
jump @MISSION_2_3

:MISSION_2_3
wait 0 ms
actor.Dead($victim4)

Dit werkt natuurlijk niet, want er staat alleen een conditie, en geen "if-jump_if_false"-structuur. Makkelijker is ook om alles in één lus te laten, zoals dit:

MISSION_2
wait 0 ms
if and
actor.Dead($victim0)
actor.Dead($victim1)
actor.Dead($victim2)
actor.Dead($victim3)
actor.Dead($victim4)
jf @MISSION_2

Wil je meerdere condities in één lus doen, schrijf dan "if and". Wil je dat maar één van die mannetjes afgeschoten wordt (in dit geval, dus maar één conditie van de lijst hoeft goed te zijn), schrijf dan "if or". Wil je maar één conditie gebruiken, schrijf dan alleen "if". :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.