Jump to content

Paramedic Patient Drop-off Coordinates/Spheres and Modifying Paramedic Mission [Sa Classic]


ArmanCan

Recommended Posts

Hi my lovely modders and experts 🥰

 

- I'm currently trying to find the spheres/coordinates of Paramedic Drop-off coordinates/spheres but i couldn't find them.. Do you guys now where can i find on main.scm?

- I'm also trying to modify paramedic mission to spawn more Ambulances to all small counties and make new jurisdictions for them.. like Paramedic Mission for only Palomino Creek or Dillimore.. Is there a way to modify the mission script and apply to the game?

 

Thanks in advance.. the weather is hot and wild.. just buy/find yourself an air conditioner (if you don't have) and don't forget to drink water 😉

Link to comment
Share on other sites

 

 

 

The coords to spawn the bleeding peds for picking up are random calculated in relation to the hospital that is the closest to player.

 

And then opcode 02C0: is used to find a propper spawn point on ped paths

:AMBULAN_8497
02C0: store_to 176@ 177@ 178@ ped_path_coords_closest_to 165@ 166@ 169@

 

 

The coords of the Hospital are given by this jump table

:AMBULAN_1974
0871: init_jump_table 213@ total_jumps 8 default_jump 1 @AMBULAN_2958 jumps 1 @AMBULAN_2102 2 @AMBULAN_2209 3 @AMBULAN_2316 4 @AMBULAN_2423 5 @AMBULAN_2530 6 @AMBULAN_2637 7 @AMBULAN_2744 
0872: jump_table_jumps 8 @AMBULAN_2851 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 

:AMBULAN_2102
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2209
0007: 167@ = 1180.85 
0007: 168@ = -1325.57 
0007: 169@ = 12.58 
0007: 173@ = 1172.0 
0007: 174@ = -1324.0 
0007: 175@ = 15.0 
0007: 197@ = 450.0 
0007: 198@ = 1800.0 
0007: 199@ = -1900.0 
0007: 200@ = -870.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2316
0007: 167@ = -316.3832 
0007: 168@ = 1056.045 
0007: 169@ = 18.7344 
0007: 173@ = -316.0 
0007: 174@ = 1050.0 
0007: 175@ = 20.0 
0007: 197@ = -860.0 
0007: 198@ = 185.0 
0007: 199@ = 749.0 
0007: 200@ = 1616.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2423
0007: 167@ = -1514.006 
0007: 168@ = 2532.013 
0007: 169@ = 54.7443 
0007: 173@ = -1515.0 
0007: 174@ = 2520.0 
0007: 175@ = 56.0 
0007: 197@ = -1684.0 
0007: 198@ = -702.0 
0007: 199@ = 1465.0 
0007: 200@ = 2749.9 
0002: jump @AMBULAN_3065 

:AMBULAN_2530
0007: 167@ = 1225.0 
0007: 168@ = 302.0 
0007: 169@ = 20.0 
0007: 173@ = 1227.0 
0007: 174@ = 289.5 
0007: 175@ = 22.64 
0007: 197@ = 100.0 
0007: 198@ = 2604.0 
0007: 199@ = -720.0 
0007: 200@ = 465.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2637
0007: 167@ = -2198.693 
0007: 168@ = -2290.105 
0007: 169@ = 29.625 
0007: 173@ = -2204.728 
0007: 174@ = -2296.302 
0007: 175@ = 29.6181 
0007: 197@ = -2598.0 
0007: 198@ = -1500.0 
0007: 199@ = -2700.0 
0007: 200@ = -1700.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2744
0007: 167@ = -2670.285 
0007: 168@ = 616.4364 
0007: 169@ = 13.4531 
0007: 173@ = -2677.0 
0007: 174@ = 632.0 
0007: 175@ = 14.0 
0007: 197@ = -2820.0 
0007: 198@ = -1784.0 
0007: 199@ = 29.0 
0007: 200@ = 1180.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2851
0007: 167@ = 1578.446 
0007: 168@ = 1770.682 
0007: 169@ = 9.8358 
0007: 173@ = 1582.0 
0007: 174@ = 1765.0 
0007: 175@ = 11.0 
0007: 197@ = 1000.0 
0007: 198@ = 2600.0 
0007: 199@ = 772.0 
0007: 200@ = 2400.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2958
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065

 

 

167@ - 175@ = 2x  x,y,z coords
one point for the red sphere where you have to stop the vehicle
the other point is the destination where the peds should go after release

 

197@ - 200@ are limits for the random calculation

 

 

 

 

 

 

 

5 hours ago, ArmanCan said:

- I'm also trying to modify paramedic mission to spawn more Ambulances to all small counties and make new jurisdictions for them.. like Paramedic Mission for only Palomino Creek or Dillimore.. Is there a way to modify the mission script and apply to the game?

 

Expand the jump table and test it

 

Below the modified jump table

- encreased total_jumps number in opcode 0871

- changed jump note in opcode 0872 9 @AMBULAN_2975

- added additional coords block for new location at :AMBULAN_2975

- changing coords of new coords block is your job

 

:AMBULAN_1974
0871: init_jump_table 213@ total_jumps 9 default_jump 1 @AMBULAN_2958 jumps 1 @AMBULAN_2102 2 @AMBULAN_2209 3 @AMBULAN_2316 4 @AMBULAN_2423 5 @AMBULAN_2530 6 @AMBULAN_2637 7 @AMBULAN_2744 
0872: jump_table_jumps 8 @AMBULAN_2851 9 @AMBULAN_2975 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 

:AMBULAN_2102
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2209
0007: 167@ = 1180.85 
0007: 168@ = -1325.57 
0007: 169@ = 12.58 
0007: 173@ = 1172.0 
0007: 174@ = -1324.0 
0007: 175@ = 15.0 
0007: 197@ = 450.0 
0007: 198@ = 1800.0 
0007: 199@ = -1900.0 
0007: 200@ = -870.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2316
0007: 167@ = -316.3832 
0007: 168@ = 1056.045 
0007: 169@ = 18.7344 
0007: 173@ = -316.0 
0007: 174@ = 1050.0 
0007: 175@ = 20.0 
0007: 197@ = -860.0 
0007: 198@ = 185.0 
0007: 199@ = 749.0 
0007: 200@ = 1616.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2423
0007: 167@ = -1514.006 
0007: 168@ = 2532.013 
0007: 169@ = 54.7443 
0007: 173@ = -1515.0 
0007: 174@ = 2520.0 
0007: 175@ = 56.0 
0007: 197@ = -1684.0 
0007: 198@ = -702.0 
0007: 199@ = 1465.0 
0007: 200@ = 2749.9 
0002: jump @AMBULAN_3065 

:AMBULAN_2530
0007: 167@ = 1225.0 
0007: 168@ = 302.0 
0007: 169@ = 20.0 
0007: 173@ = 1227.0 
0007: 174@ = 289.5 
0007: 175@ = 22.64 
0007: 197@ = 100.0 
0007: 198@ = 2604.0 
0007: 199@ = -720.0 
0007: 200@ = 465.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2637
0007: 167@ = -2198.693 
0007: 168@ = -2290.105 
0007: 169@ = 29.625 
0007: 173@ = -2204.728 
0007: 174@ = -2296.302 
0007: 175@ = 29.6181 
0007: 197@ = -2598.0 
0007: 198@ = -1500.0 
0007: 199@ = -2700.0 
0007: 200@ = -1700.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2744
0007: 167@ = -2670.285 
0007: 168@ = 616.4364 
0007: 169@ = 13.4531 
0007: 173@ = -2677.0 
0007: 174@ = 632.0 
0007: 175@ = 14.0 
0007: 197@ = -2820.0 
0007: 198@ = -1784.0 
0007: 199@ = 29.0 
0007: 200@ = 1180.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2851
0007: 167@ = 1578.446 
0007: 168@ = 1770.682 
0007: 169@ = 9.8358 
0007: 173@ = 1582.0 
0007: 174@ = 1765.0 
0007: 175@ = 11.0 
0007: 197@ = 1000.0 
0007: 198@ = 2600.0 
0007: 199@ = 772.0 
0007: 200@ = 2400.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2958
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065

:AMBULAN_2975//------- new location
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065

 

Edited by ZAZ
Link to comment
Share on other sites

1 hour ago, ZAZ said:

The coords to spawn the bleeding peds for picking up are random calculated in relation to the hospital that is the closest to player.

Thank you so much for the explanations.. It's irrelevant for me right now but it maybe useful for my second request later..🙂

1 hour ago, ZAZ said:

And then opcode 02C0: is used to find a propper spawn point on ped paths

I think this one will join the party later.. i have a question for spawning.. Which one is the correct logic.. ZONE or DISTANCE between hospital and patients?

 

For example Montgomery hospital has three jurisdictions.. Palomino Creek, Dillimore and Montgomery itself (Somehow it doesn't cover Blueberry but anyway 😃) but this hospital respects the other zones but according to distance between Montgomery and Palomino Creek it is perfectly possible to spawn patients between hospital and Mulholland area.. 

2 hours ago, ZAZ said:

one point for the red sphere where you have to stop the vehicle

it seems variables between 167 and 169 are sphere coordinates.. i also have another question.. can i make this sphere like taxi destination markers/spheres? (As soon as ambulance touched the marker/sphere the ambulance will stop and trigger the drop-off)

 

2 hours ago, ZAZ said:
:AMBULAN_2975//------- new location
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065

Let's say i've determined the coords between 167 and 175.. how will i enter the calculations of 197, 198, 199 and 200?

 

Well.. it will be just test so i'm gonna enter something logical and start the test 😃

Link to comment
Share on other sites

 

 


I must explain more: the jump table jump number is given by these checks for distance between point and point, above of the jump table
And there're these checks for integer_stat 181

 

Let's say San Andreas is unlocked complete (integer_stat 181 = 4)
So let's start here

00A0: store_actor $PLAYER_ACTOR position_to 201@ 202@ 203@
0007: 212@ = 9999999.0
0652: $STAT_UNLOCKED_CITIES_NUMBER = integer_stat 181
00D6: if
001A:   2 > $STAT_UNLOCKED_CITIES_NUMBER
004D: jump_if_false @AMBULAN_1470

 

so the code goes to AMBULAN_1470 because UNLOCKED_CITIES_NUMBER = 4


so let's continue here

:AMBULAN_1470
050A: 204@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 2004.96 -1442.96 12.56// <-- coords of hospital 
00D6: if 
0025:   212@ > 204@ // (float) 
004D: jump_if_false @AMBULAN_1533 
0087: 212@ = 204@ // (float) 
0006: 213@ = 1// <<<---------------------- jump table jump number 

:AMBULAN_1533
050A: 205@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1180.85 -1325.57 12.58// <-- coords of hospital  
00D6: if 
0025:   212@ > 205@ // (float) 
004D: jump_if_false @AMBULAN_1596 
0087: 212@ = 205@ // (float) 
0006: 213@ = 2// <<<---------------------- jump table jump number 

:AMBULAN_1596
050A: 206@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -316.3832 1056.045 18.7344// <-- coords of hospital  
00D6: if 
0025:   212@ > 206@ // (float) 
004D: jump_if_false @AMBULAN_1659 
0087: 212@ = 206@ // (float) 
0006: 213@ = 3// <<<---------------------- jump table jump number 

:AMBULAN_1659
050A: 207@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -1514.823 2527.119 54.7443// <-- coords of hospital  
00D6: if 
0025:   212@ > 207@ // (float) 
004D: jump_if_false @AMBULAN_1722 
0087: 212@ = 207@ // (float) 
0006: 213@ = 4// <<<---------------------- jump table jump number 

:AMBULAN_1722
050A: 208@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1244.437 331.2261 18.5547// <-- coords of hospital  
00D6: if 
0025:   212@ > 208@ // (float) 
004D: jump_if_false @AMBULAN_1785 
0087: 212@ = 208@ // (float) 
0006: 213@ = 5// <<<---------------------- jump table jump number 

:AMBULAN_1785
050A: 209@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -2198.693 -2290.105 29.625// <-- coords of hospital  
00D6: if 
0025:   212@ > 209@ // (float) 
004D: jump_if_false @AMBULAN_1848 
0087: 212@ = 209@ // (float) 
0006: 213@ = 6// <<<---------------------- jump table jump number 

:AMBULAN_1848
050A: 210@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -2670.285 616.4364 13.4531// <-- coords of hospital  
00D6: if 
0025:   212@ > 210@ // (float) 
004D: jump_if_false @AMBULAN_1911 
0087: 212@ = 210@ // (float) 
0006: 213@ = 7// <<<---------------------- jump table jump number 

:AMBULAN_1911
050A: 211@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1578.446 1770.682 9.8358// <-- coords of hospital  
00D6: if 
0025:   212@ > 211@ // (float) 
004D: jump_if_false @AMBULAN_1974 
0087: 212@ = 211@ // (float) 
0006: 213@ = 8// <<<---------------------- jump table jump number 

 

then it needs something here that gives 9 as jump table jump number
to can jump to the added coords block

Spoiler
:AMBULAN_1974
0871: init_jump_table 213@ total_jumps 9 default_jump 1 @AMBULAN_2958 jumps 1 @AMBULAN_2102 2 @AMBULAN_2209 3 @AMBULAN_2316 4 @AMBULAN_2423 5 @AMBULAN_2530 6 @AMBULAN_2637 7 @AMBULAN_2744 
0872: jump_table_jumps 8 @AMBULAN_2851 9 @AMBULAN_2975 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065

// changed jump note in opcode 0872: 9 @AMBULAN_2975

:AMBULAN_2975//------- new location
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065

 

 

 

Read here if you don't know how the jump table works

 

 

 

Edited by ZAZ
Link to comment
Share on other sites

10 hours ago, ZAZ said:

then it needs something here that gives 9 as jump table jump number
to can jump to the added coords block

yes i was going to mention to you.. I've also realized that labels between 1470 and 1911 are also connected to coordinate jumps and unlikely this segment is out of variables.. because of that it seems i can't add one more hospital.. even for testing.. 🙁

 

I'm going to ask this question again.. can i make this sphere like taxi destination markers/spheres? (As soon as ambulance touched the marker/sphere the ambulance will stop and trigger the drop-off)

Link to comment
Share on other sites

I modified the ambulan script to add a location at the church of palomino creek in following way:

:AMBULAN_836
0006: 99@ = 0 
00BC: show_text_highpriority GXT 'ATUTOR2' time 3000 flag 1  // ~s~Fahre die ~b~Patienten~s~ VORSICHTIG in die ~y~Klinik~s~. Jede Ersch¬tterung mindert ihre berlebenschancen.
03C7: set_sensitivity_to_crime 0.5 
00A0: store_actor $PLAYER_ACTOR position_to 201@ 202@ 203@ 
0007: 212@ = 9999999.0 
0652: $STAT_UNLOCKED_CITIES_NUMBER = integer_stat 181 
00D6: if 
001A:   2 > $STAT_UNLOCKED_CITIES_NUMBER 
004D: jump_if_false @AMBULAN_1470 
00D6: if 
0038:   $STAT_UNLOCKED_CITIES_NUMBER == 0 
004D: jump_if_false @AMBULAN_1130
if
    00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2256.5 -32.5 26.5 radius 350.0 350.0 90.0//- new location - Pelomino Creek
then
    213@ = 9
    jump @AMBULAN_1974
end
  

 
050A: 204@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 2004.96 -1442.96 12.56//Los Santos\EAST 1 
00D6: if 
0025:   212@ > 204@ // (float) 
004D: jump_if_false @AMBULAN_997 
0087: 212@ = 204@ // (float) 
0006: 213@ = 1 

:AMBULAN_997
050A: 205@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1180.85 -1325.57 12.58//Los Santos\DOWNTOWN 2 
00D6: if 
0025:   212@ > 205@ // (float) 
004D: jump_if_false @AMBULAN_1060 
0087: 212@ = 205@ // (float) 
0006: 213@ = 2 

:AMBULAN_1060
050A: 208@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1244.437 331.2261 18.5547//MONT GOMERY\ 5 
00D6: if 
0025:   212@ > 208@ // (float) 
004D: jump_if_false @AMBULAN_1123 
0087: 212@ = 208@ // (float) 
0006: 213@ = 5 

:AMBULAN_1123
0002: jump @AMBULAN_1463 

:AMBULAN_1130
00D6: if 
0038:   $STAT_UNLOCKED_CITIES_NUMBER == 1 
004D: jump_if_false @AMBULAN_1463
if
    00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2256.5 -32.5 26.5 radius 350.0 350.0 90.0//- new location - Pelomino Creek
then
    213@ = 9
    jump @AMBULAN_1974
end
 
050A: 204@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 2004.96 -1442.96 12.56//Los Santos\EAST 1 
00D6: if 
0025:   212@ > 204@ // (float) 
004D: jump_if_false @AMBULAN_1211 
0087: 212@ = 204@ // (float) 
0006: 213@ = 1 

:AMBULAN_1211
050A: 205@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1180.85 -1325.57 12.58//Los Santos\DOWNTOWN 2 
00D6: if 
0025:   212@ > 205@ // (float) 
004D: jump_if_false @AMBULAN_1274 
0087: 212@ = 205@ // (float) 
0006: 213@ = 2 

:AMBULAN_1274
050A: 208@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1244.437 331.2261 18.5547//MONT GOMERY\ 5 
00D6: if 
0025:   212@ > 208@ // (float) 
004D: jump_if_false @AMBULAN_1337 
0087: 212@ = 208@ // (float) 
0006: 213@ = 5 

:AMBULAN_1337
050A: 209@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -2198.693 -2290.105 29.625//ANGEL PINE\ 6 
00D6: if 
0025:   212@ > 209@ // (float) 
004D: jump_if_false @AMBULAN_1400 
0087: 212@ = 209@ // (float) 
0006: 213@ = 6 

:AMBULAN_1400
050A: 210@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -2670.285 616.4364 13.4531//SAN FIERRO\ 7 
00D6: if 
0025:   212@ > 210@ // (float) 
004D: jump_if_false @AMBULAN_1463 
0087: 212@ = 210@ // (float) 
0006: 213@ = 7 

:AMBULAN_1463
0002: jump @AMBULAN_1974 

:AMBULAN_1470
if
    00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2256.5 -32.5 26.5 radius 350.0 350.0 90.0//- new location - Pelomino Creek
then
    213@ = 9
    jump @AMBULAN_1974
end

050A: 204@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 2004.96 -1442.96 12.56 
00D6: if 
0025:   212@ > 204@ // (float) 
004D: jump_if_false @AMBULAN_1533 
0087: 212@ = 204@ // (float) 
0006: 213@ = 1 

:AMBULAN_1533
050A: 205@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1180.85 -1325.57 12.58 
00D6: if 
0025:   212@ > 205@ // (float) 
004D: jump_if_false @AMBULAN_1596 
0087: 212@ = 205@ // (float) 
0006: 213@ = 2 

:AMBULAN_1596
050A: 206@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -316.3832 1056.045 18.7344 
00D6: if 
0025:   212@ > 206@ // (float) 
004D: jump_if_false @AMBULAN_1659 
0087: 212@ = 206@ // (float) 
0006: 213@ = 3 

:AMBULAN_1659
050A: 207@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -1514.823 2527.119 54.7443 
00D6: if 
0025:   212@ > 207@ // (float) 
004D: jump_if_false @AMBULAN_1722 
0087: 212@ = 207@ // (float) 
0006: 213@ = 4 

:AMBULAN_1722
050A: 208@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1244.437 331.2261 18.5547 
00D6: if 
0025:   212@ > 208@ // (float) 
004D: jump_if_false @AMBULAN_1785 
0087: 212@ = 208@ // (float) 
0006: 213@ = 5 

:AMBULAN_1785
050A: 209@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -2198.693 -2290.105 29.625 
00D6: if 
0025:   212@ > 209@ // (float) 
004D: jump_if_false @AMBULAN_1848 
0087: 212@ = 209@ // (float) 
0006: 213@ = 6 

:AMBULAN_1848
050A: 210@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ -2670.285 616.4364 13.4531 
00D6: if 
0025:   212@ > 210@ // (float) 
004D: jump_if_false @AMBULAN_1911 
0087: 212@ = 210@ // (float) 
0006: 213@ = 7 

:AMBULAN_1911
050A: 211@ = distance_between_XYZ 201@ 202@ 203@ and_XYZ 1578.446 1770.682 9.8358 
00D6: if 
0025:   212@ > 211@ // (float) 
004D: jump_if_false @AMBULAN_1974 
0087: 212@ = 211@ // (float) 
0006: 213@ = 8 

:AMBULAN_1974
0871: init_jump_table 213@ total_jumps 9 default_jump 1 @AMBULAN_2958 jumps 1 @AMBULAN_2102 2 @AMBULAN_2209 3 @AMBULAN_2316 4 @AMBULAN_2423 5 @AMBULAN_2530 6 @AMBULAN_2637 7 @AMBULAN_2744 
0872: jump_table_jumps 8 @AMBULAN_2851 9 @AMBULAN_2975 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 -1 @AMBULAN_3065 

:AMBULAN_2102//Los Santos\EAST 1
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2209//Los Santos\DOWNTOWN 2
0007: 167@ = 1180.85 
0007: 168@ = -1325.57 
0007: 169@ = 12.58 
0007: 173@ = 1172.0 
0007: 174@ = -1324.0 
0007: 175@ = 15.0 
0007: 197@ = 450.0 
0007: 198@ = 1800.0 
0007: 199@ = -1900.0 
0007: 200@ = -870.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2316//FORT CARSON\ 3
0007: 167@ = -316.3832 
0007: 168@ = 1056.045 
0007: 169@ = 18.7344 
0007: 173@ = -316.0 
0007: 174@ = 1050.0 
0007: 175@ = 20.0 
0007: 197@ = -860.0 
0007: 198@ = 185.0 
0007: 199@ = 749.0 
0007: 200@ = 1616.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2423//ELQUEBRADOS\ 4
0007: 167@ = -1514.006 
0007: 168@ = 2532.013 
0007: 169@ = 54.7443 
0007: 173@ = -1515.0 
0007: 174@ = 2520.0 
0007: 175@ = 56.0 
0007: 197@ = -1684.0 
0007: 198@ = -702.0 
0007: 199@ = 1465.0 
0007: 200@ = 2749.9 
0002: jump @AMBULAN_3065 

:AMBULAN_2530//MONT GOMERY\ 5
0007: 167@ = 1225.0 
0007: 168@ = 302.0 
0007: 169@ = 20.0 
0007: 173@ = 1227.0 
0007: 174@ = 289.5 
0007: 175@ = 22.64 
0007: 197@ = 100.0 
0007: 198@ = 2604.0 
0007: 199@ = -720.0 
0007: 200@ = 465.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2637//ANGEL PINE\ 6
0007: 167@ = -2198.693 
0007: 168@ = -2290.105 
0007: 169@ = 29.625 
0007: 173@ = -2204.728 
0007: 174@ = -2296.302 
0007: 175@ = 29.6181 
0007: 197@ = -2598.0 
0007: 198@ = -1500.0 
0007: 199@ = -2700.0 
0007: 200@ = -1700.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2744//SAN FIERRO\ 7
0007: 167@ = -2670.285 
0007: 168@ = 616.4364 
0007: 169@ = 13.4531 
0007: 173@ = -2677.0 
0007: 174@ = 632.0 
0007: 175@ = 14.0 
0007: 197@ = -2820.0 
0007: 198@ = -1784.0 
0007: 199@ = 29.0 
0007: 200@ = 1180.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2851//LAS VENTURAS\ 8
0007: 167@ = 1578.446 
0007: 168@ = 1770.682 
0007: 169@ = 9.8358 
0007: 173@ = 1582.0 
0007: 174@ = 1765.0 
0007: 175@ = 11.0 
0007: 197@ = 1000.0 
0007: 198@ = 2600.0 
0007: 199@ = 772.0 
0007: 200@ = 2400.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2958//Los Santos\EAST -1
0007: 167@ = 2004.96 
0007: 168@ = -1442.96 
0007: 169@ = 12.56 
0007: 173@ = 2026.0 
0007: 174@ = -1423.0 
0007: 175@ = 17.0 
0007: 197@ = 1200.0 
0007: 198@ = 2930.0 
0007: 199@ = -2213.0 
0007: 200@ = -1012.0 
0002: jump @AMBULAN_3065 

:AMBULAN_2975//------- new location - Pelomino Creek
0007: 167@ = 2256.5
0007: 168@ = -32.5
0007: 169@ = 26.5 
0007: 173@ = 2256.7
0007: 174@ = -44.55 
0007: 175@ = 26.9 
0007: 197@ = 100.0 
0007: 198@ = 2604.0 
0007: 199@ = -720.0 
0007: 200@ = 465.0 
0002: jump @AMBULAN_3065

 

 

 

 

12 hours ago, ArmanCan said:

I'm going to ask this question again.. can i make this sphere like taxi destination markers/spheres? (As soon as ambulance touched the marker/sphere the ambulance will stop and trigger the drop-off)

 

you mean the car should stop automaticly?

can you do when you modify the script block at :AMBULAN_14762 in following way

:AMBULAN_14762
00D6: if 
0039:   80@ == 3 
004D: jump_if_false @AMBULAN_14847 
00D6: if 
//0103:   actor $PLAYER_ACTOR in_sphere 167@ 168@ 169@ radius 6.0 6.0 2.0 sphere 0 stopped_in_car 
0100:   actor $PLAYER_ACTOR in_sphere 167@ 168@ 169@ radius 6.0 6.0 2.0 sphere 0 in_car
004D: jump_if_false @AMBULAN_14847
03C0: 34@ = actor $PLAYER_ACTOR car
00AD: set_car 34@ max_speed_to  0.0
01B4: set_player $PLAYER_CHAR can_move 0 
05D3: AS_actor 77@ goto_point 173@ 174@ 175@ mode 6 time -1 ms // versionA 
0006: 80@ = 4 
wait 1000
01B4: set_player $PLAYER_CHAR can_move 1

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

@ZAZ Ohh Mannn!!.. you did so much stuff for me.. adding a hospital with this way is little bit complicated but perfectly possible 😉 i still need to know how to enter the calcuations under the coords.. anyway i didn't complete a full test but i've recorded a new video for you..😃

 

I just need to increase the "wait" value bit more to give time to patients to leave the ambulance properly 😉

 

Edit: I've tweaked the waiting time.. entering "2500" makes it more gentle (the patients left the car one by one and 2.5 seconds time for each patient) reducing to "750" was not enough so your "1000" or close to this value seems more optimized..

You also managed to limit the paramedic area perfectly in Palomino Creek zone.. how did you do it? 🤔

Edited by ArmanCan
Link to comment
Share on other sites

20 hours ago, ArmanCan said:

@ZAZ Ohh Mannn!!.. you did so much stuff for me.. adding a hospital with this way is little bit complicated but perfectly possible 

was not a big deal

 

 

Quote

i still need to know how to enter the calcuations under the coords

 

at first you have the gosub @AMBULAN_7829
and then this allocations for the actor spawn

0050: gosub @AMBULAN_7829 
0087: 113@(36@,13f) = 176@ // (float) 
0087: 126@(36@,13f) = 177@ // (float) 
0087: 139@(36@,13f) = 178@ // (float) 
0376: 81@ = create_random_actor_at 113@ 126@ 139@

 

gosub @AMBULAN_7829 leads to a loop with calculations

Spoiler

 

:AMBULAN_7829
0001: wait 0 ms 
00A0: store_actor $PLAYER_ACTOR position_to 170@ 171@ 172@//<<------------------ give coords 
0087: 190@ = 167@ //<<---------------------------------------- 167@ = Hospital X coord (167@ = 2004.96) 
0087: 193@ = 167@ // (float) 
0087: 191@ = 168@ // (float) 
0087: 194@ = 168@ // (float) 
0087: 192@ = 169@ // (float) 
0087: 195@ = 169@ // (float) 
07EF: get_town_number_from_point 170@ 171@ 172@ store_to 96@ 
008F: 237@ = integer $PARAMEDIC_MISSION_LEVEL to_float 
0013: 237@ *= 60.0 
005B: 237@ += 238@ // (float) 
00D6: if 
0039:   96@ == 0 
004D: jump_if_false @AMBULAN_7970 
000B: 238@ += 15.0 
0002: jump @AMBULAN_7980 

:AMBULAN_7970
000B: 238@ += 1.0 

:AMBULAN_7980
00D6: if 
0023:   100.0 > 237@ 
004D: jump_if_false @AMBULAN_8011 
0007: 237@ = 100.0 

:AMBULAN_8011
00D6: if 
0021:   238@ > 10000.0 
004D: jump_if_false @AMBULAN_8077 
00D6: if 
0038:   $PARAMEDIC_MISSION_LEVEL == 1 
004D: jump_if_false @AMBULAN_8077 
03D5: remove_text 'ALEVEL'  // Krankenwagen-Mission Level ~1~
00BC: show_text_highpriority GXT 'A_CANC' time 3000 flag 1  // ~r~Krankenwagen-Mission abgebrochen!

:AMBULAN_8077
0063: 190@ -= 237@ // (float) 
005B: 193@ += 237@ // (float) 
0063: 191@ -= 237@ // (float) 
005B: 194@ += 237@ // (float) 
00D6: if 
001A:   8 > $PARAMEDIC_MISSION_LEVEL 
004D: jump_if_false @AMBULAN_8242 
00D6: if 
0025:   197@ > 190@ // (float) 
004D: jump_if_false @AMBULAN_8154 
0087: 190@ = 197@ // (float) 

:AMBULAN_8154
00D6: if 
0025:   193@ > 198@ // (float) 
004D: jump_if_false @AMBULAN_8181 
0087: 193@ = 198@ // (float) 

:AMBULAN_8181
00D6: if 
0025:   199@ > 191@ // (float) 
004D: jump_if_false @AMBULAN_8208 
0087: 191@ = 199@ // (float) 

:AMBULAN_8208
00D6: if 
0025:   166@ > 200@ // (float) 
004D: jump_if_false @AMBULAN_8235 
0087: 194@ = 200@ // (float) 

:AMBULAN_8235
0002: jump @AMBULAN_8274 

:AMBULAN_8242
0087: 190@ = 197@ // (float) 
0087: 193@ = 198@ // (float) 
0087: 191@ = 199@ // (float) 
0087: 194@ = 200@ // (float) 

:AMBULAN_8274
0208: 165@ = random_float_in_ranges 190@ 193@//<<--- give coords <<------- 190@ = 167@ / 167@ = Hospital X coord (167@ = 2004.96)
0208: 166@ = random_float_in_ranges 191@ 194@//<<--- give coords  
0293: $13 = get_controller_mode 
00D6: if 
00E1:   player 0 pressed_key 19 
004D: jump_if_false @AMBULAN_8325 
0006: 53@ = 1

:AMBULAN_8325
00D6: if 
0039:   53@ == 1 
004D: jump_if_false @AMBULAN_8426 
00D6: if 
8038:   not  $13 == 3 
004D: jump_if_false @AMBULAN_8421 
00D6: if 
80E1:   not player 0 pressed_key 19 
004D: jump_if_false @AMBULAN_8414 
03D5: remove_text 'ALEVEL'  // Krankenwagen-Mission Level ~1~
00BC: show_text_highpriority GXT 'A_CANC' time 3000 flag 1  // ~r~Krankenwagen-Mission abgebrochen!
0006: 79@ = 1 
0051: return 

:AMBULAN_8414
0002: jump @AMBULAN_8426 

:AMBULAN_8421
0293: $13 = get_controller_mode 

:AMBULAN_8426
00D6: if 
8118:   not actor $PLAYER_ACTOR dead 
004D: jump_if_false @AMBULAN_8497 
00D6: if 
80DD:   not actor $PLAYER_ACTOR driving_car_with_model #AMBULAN 
004D: jump_if_false @AMBULAN_8497 
03D5: remove_text 'ALEVEL'  // Krankenwagen-Mission Level ~1~
00BC: show_text_highpriority GXT 'A_CANC' time 3000 flag 1  // ~r~Krankenwagen-Mission abgebrochen!
0006: 79@ = 1 
0051: return 

:AMBULAN_8497
02C0: store_to 176@ 177@ 178@ ped_path_coords_closest_to 165@ 166@ 169@ 
00D6: if 
0025:   197@ > 176@ // (float) 
004D: jump_if_false @AMBULAN_8550 
0002: jump @AMBULAN_7829 
0002: jump @AMBULAN_8642 

:AMBULAN_8550
00D6: if 
0025:   176@ > 198@ // (float) 
004D: jump_if_false @AMBULAN_8583 
0002: jump @AMBULAN_7829 
0002: jump @AMBULAN_8642 

:AMBULAN_8583
00D6: if 
0025:   199@ > 177@ // (float) 
004D: jump_if_false @AMBULAN_8616 
0002: jump @AMBULAN_7829 
0002: jump @AMBULAN_8642 

:AMBULAN_8616
00D6: if 
0025:   177@ > 200@ // (float) 
004D: jump_if_false @AMBULAN_8642 
0002: jump @AMBULAN_7829 

:AMBULAN_8642
00D6: if 
0023:   6.0 > 178@ 
004D: jump_if_false @AMBULAN_8670 
0002: jump @AMBULAN_7829 

:AMBULAN_8670
050A: 185@ = distance_between_XYZ 170@ 171@ 172@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   50.0 > 185@ 
004D: jump_if_false @AMBULAN_8721 
0002: jump @AMBULAN_7829 

:AMBULAN_8721
050A: 186@ = distance_between_XYZ 167@ 168@ 169@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   30.0 > 186@ 
004D: jump_if_false @AMBULAN_8772 
0002: jump @AMBULAN_7829 

:AMBULAN_8772
0652: $STAT_UNLOCKED_CITIES_NUMBER = integer_stat 181 
00D6: if 
001A:   2 > $STAT_UNLOCKED_CITIES_NUMBER 
004D: jump_if_false @AMBULAN_9234 
00D6: if 
0038:   $STAT_UNLOCKED_CITIES_NUMBER == 0 
004D: jump_if_false @AMBULAN_9048 
00D6: if and
0023:   78.4427 > 176@ 
0023:   -699.519 > 177@ 
004D: jump_if_false @AMBULAN_8858 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_8858
00D6: if and
0023:   -252.6557 > 176@ 
0023:   -285.766 > 177@ 
004D: jump_if_false @AMBULAN_8900 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_8900
00D6: if 
0023:   -948.3447 > 176@ 
004D: jump_if_false @AMBULAN_8932 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_8932
00D6: if and
0021:   176@ > 1473.448 
0021:   177@ > 403.7353 
004D: jump_if_false @AMBULAN_8974 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_8974
00D6: if 
0021:   177@ > 578.6325 
004D: jump_if_false @AMBULAN_9006 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_9006
00D6: if and
0023:   837.5551 > 176@ 
0021:   177@ > 347.4097 
004D: jump_if_false @AMBULAN_9048 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_9048
00D6: if 
0038:   $STAT_UNLOCKED_CITIES_NUMBER == 1 
004D: jump_if_false @AMBULAN_9234 
00D6: if and
0021:   176@ > 1473.448 
0021:   177@ > 403.7353 
004D: jump_if_false @AMBULAN_9108 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_9108
00D6: if and
0021:   177@ > 578.6325 
0021:   176@ > -1528.498 
004D: jump_if_false @AMBULAN_9150 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_9150
00D6: if and
0023:   837.5551 > 176@ 
0021:   176@ > -1528.498 
0021:   177@ > 347.4097 
004D: jump_if_false @AMBULAN_9202 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_9202
00D6: if 
0021:   177@ > 1380.0 
004D: jump_if_false @AMBULAN_9234 
0001: wait 0 ms 
0002: jump @AMBULAN_7829 

:AMBULAN_9234
00D6: if 
0019:   37@ > 0 
004D: jump_if_false @AMBULAN_9303 
050A: 212@ = distance_between_XYZ 113@ 126@ 139@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9303 
0002: jump @AMBULAN_7829 

:AMBULAN_9303
00D6: if 
0019:   37@ > 1 
004D: jump_if_false @AMBULAN_9372 
050A: 212@ = distance_between_XYZ 113@ 126@ 139@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9372 
0002: jump @AMBULAN_7829 

:AMBULAN_9372
00D6: if 
0019:   37@ > 2 
004D: jump_if_false @AMBULAN_9441 
050A: 212@ = distance_between_XYZ 114@ 127@ 140@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9441 
0002: jump @AMBULAN_7829 

:AMBULAN_9441
00D6: if 
0019:   37@ > 3 
004D: jump_if_false @AMBULAN_9510 
050A: 212@ = distance_between_XYZ 115@ 128@ 141@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9510 
0002: jump @AMBULAN_7829 

:AMBULAN_9510
00D6: if 
0019:   37@ > 4 
004D: jump_if_false @AMBULAN_9579 
050A: 212@ = distance_between_XYZ 116@ 129@ 142@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9579 
0002: jump @AMBULAN_7829 

:AMBULAN_9579
00D6: if 
0019:   37@ > 5 
004D: jump_if_false @AMBULAN_9648 
050A: 212@ = distance_between_XYZ 117@ 130@ 143@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9648 
0002: jump @AMBULAN_7829 

:AMBULAN_9648
00D6: if 
0019:   37@ > 6 
004D: jump_if_false @AMBULAN_9717 
050A: 212@ = distance_between_XYZ 118@ 131@ 144@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9717 
0002: jump @AMBULAN_7829 

:AMBULAN_9717
00D6: if 
0019:   37@ > 7 
004D: jump_if_false @AMBULAN_9786 
050A: 212@ = distance_between_XYZ 119@ 132@ 145@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9786 
0002: jump @AMBULAN_7829 

:AMBULAN_9786
00D6: if 
0019:   37@ > 8 
004D: jump_if_false @AMBULAN_9855 
050A: 212@ = distance_between_XYZ 120@ 133@ 146@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9855 
0002: jump @AMBULAN_7829 

:AMBULAN_9855
00D6: if 
0019:   37@ > 9 
004D: jump_if_false @AMBULAN_9924 
050A: 212@ = distance_between_XYZ 121@ 134@ 147@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9924 
0002: jump @AMBULAN_7829 

:AMBULAN_9924
00D6: if 
0019:   37@ > 10 
004D: jump_if_false @AMBULAN_9993 
050A: 212@ = distance_between_XYZ 122@ 135@ 148@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_9993 
0002: jump @AMBULAN_7829 

:AMBULAN_9993
00D6: if 
0019:   37@ > 11 
004D: jump_if_false @AMBULAN_10062 
050A: 212@ = distance_between_XYZ 123@ 136@ 149@ and_XYZ 176@ 177@ 178@ 
00D6: if 
0023:   25.0 > 212@ 
004D: jump_if_false @AMBULAN_10062 
0002: jump @AMBULAN_7829 

:AMBULAN_10062
00D6: if 
038A:   any_car_in_cube_cornerA 176@ 177@ 177@ cornerB 25.0 25.0 10.0 
004D: jump_if_false @AMBULAN_10106 
0002: jump @AMBULAN_7829 

:AMBULAN_10106
00D6: if 
0023:   1186.0 > 176@ 
004D: jump_if_false @AMBULAN_10197 
00D6: if 
0021:   176@ > 1047.0 
004D: jump_if_false @AMBULAN_10197 
00D6: if 
0023:   -1406.0 > 177@ 
004D: jump_if_false @AMBULAN_10197 
00D6: if 
0021:   177@ > -1567.0 
004D: jump_if_false @AMBULAN_10197 
0002: jump @AMBULAN_7829 

:AMBULAN_10197
00D6: if 
0023:   1444.0 > 176@ 
004D: jump_if_false @AMBULAN_10288 
00D6: if 
0021:   176@ > 1339.0 
004D: jump_if_false @AMBULAN_10288 
00D6: if 
0023:   -1450.0 > 177@ 
004D: jump_if_false @AMBULAN_10288 
00D6: if 
0021:   177@ > -1504.0 
004D: jump_if_false @AMBULAN_10288 
0002: jump @AMBULAN_7829 

:AMBULAN_10288
00D6: if 
0023:   2041.979 > 176@ 
004D: jump_if_false @AMBULAN_10379 
00D6: if 
0021:   176@ > 1999.387 
004D: jump_if_false @AMBULAN_10379 
00D6: if 
0023:   -1408.708 > 177@ 
004D: jump_if_false @AMBULAN_10379 
00D6: if 
0021:   177@ > -1445.462 
004D: jump_if_false @AMBULAN_10379 
0002: jump @AMBULAN_7829 

:AMBULAN_10379
00D6: if 
0023:   1202.0 > 176@ 
004D: jump_if_false @AMBULAN_10470 
00D6: if 
0021:   176@ > 1162.0 
004D: jump_if_false @AMBULAN_10470 
00D6: if 
0023:   -1238.0 > 177@ 
004D: jump_if_false @AMBULAN_10470 
00D6: if 
0021:   177@ > -1250.0 
004D: jump_if_false @AMBULAN_10470 
0002: jump @AMBULAN_7829 

:AMBULAN_10470
00D6: if 
0023:   1176.0 > 176@ 
004D: jump_if_false @AMBULAN_10561 
00D6: if 
0021:   176@ > 1158.0 
004D: jump_if_false @AMBULAN_10561 
00D6: if 
0023:   1364.0 > 177@ 
004D: jump_if_false @AMBULAN_10561 
00D6: if 
0021:   177@ > 1345.0 
004D: jump_if_false @AMBULAN_10561 
0002: jump @AMBULAN_7829 

:AMBULAN_10561
00D6: if 
0023:   -2307.0 > 176@ 
004D: jump_if_false @AMBULAN_10652 
00D6: if 
0021:   176@ > -2333.0 
004D: jump_if_false @AMBULAN_10652 
00D6: if 
0023:   1100.0 > 177@ 
004D: jump_if_false @AMBULAN_10652 
00D6: if 
0021:   177@ > 1036.0 
004D: jump_if_false @AMBULAN_10652 
0002: jump @AMBULAN_7829 

:AMBULAN_10652
00D6: if 
0023:   2009.0 > 176@ 
004D: jump_if_false @AMBULAN_10743 
00D6: if 
0021:   176@ > 1989.0 
004D: jump_if_false @AMBULAN_10743 
00D6: if 
0023:   1571.0 > 177@ 
004D: jump_if_false @AMBULAN_10743 
00D6: if 
0021:   177@ > 1513.0 
004D: jump_if_false @AMBULAN_10743 
0002: jump @AMBULAN_7829 

:AMBULAN_10743
00D6: if 
0023:   2632.818 > 176@ 
004D: jump_if_false @AMBULAN_10834 
00D6: if 
0021:   176@ > 2546.463 
004D: jump_if_false @AMBULAN_10834 
00D6: if 
0023:   -1129.673 > 177@ 
004D: jump_if_false @AMBULAN_10834 
00D6: if 
0021:   177@ > -1144.012 
004D: jump_if_false @AMBULAN_10834 
0002: jump @AMBULAN_7829 

:AMBULAN_10834
00D6: if 
0023:   -222.5044 > 176@ 
004D: jump_if_false @AMBULAN_10925 
00D6: if 
0021:   176@ > -229.096 
004D: jump_if_false @AMBULAN_10925 
00D6: if 
0023:   1412.086 > 177@ 
004D: jump_if_false @AMBULAN_10925 
00D6: if 
0021:   177@ > 1393.817 
004D: jump_if_false @AMBULAN_10925 
0002: jump @AMBULAN_7829 

:AMBULAN_10925
0007: 238@ = 0.0 
0051: return 

:AMBULAN_10937
00D6: if 
001B:   2 > 37@ 
004D: jump_if_false @AMBULAN_11046 
00D6: if 
0025:   185@ > 186@ // (float) 
004D: jump_if_false @AMBULAN_10997 
0087: 187@ = 185@ // (float) 
0073: 187@ /= 189@ // (float) 
0002: jump @AMBULAN_11013 

:AMBULAN_10997
0087: 187@ = 186@ // (float) 
0073: 187@ /= 189@ // (float) 

:AMBULAN_11013
0013: 187@ *= 1000.0 
0092: 35@ = float 187@ to_integer 
005E: $8210 += 35@ // (int) 
0002: jump @AMBULAN_11088 

:AMBULAN_11046
0087: 187@ = 186@ // (float) 
0073: 187@ /= 189@ // (float) 
0013: 187@ *= 1000.0 
0092: 35@ = float 187@ to_integer 
005E: $8210 += 35@ // (int) 

:AMBULAN_11088
0051: return                    

 

 

Summery
gosub @AMBULAN_7829 leads to a loop with getting coords and do calculations

:AMBULAN_7829
0001: wait 0 ms
00A0: store_actor $PLAYER_ACTOR position_to 170@ 171@ 172@//<<------------------ give coords 
0087: 190@ = 167@ //<<---------------------------------------- 167@ = Hospital X coord (167@ = 2004.96)

0208: 165@ = random_float_in_ranges 190@ 193@//<<--- give coords <<------- 190@ = 167@ / 167@ = Hospital X coord (167@ = 2004.96)

02C0: store_to 176@ 177@ 178@ ped_path_coords_closest_to 165@ 166@ 169@//<<--- give coords

 

coord allocations for the actor spawn

:AMBULAN_3154
00D6: if 
001D:   37@ > 36@ // (int) 
004D: jump_if_false @AMBULAN_3355 
0050: gosub @AMBULAN_7829//<<----------------- gosub @AMBULAN_7829
0087: 113@(36@,13f) = 176@ // <<----------------02C0: store_to 176@ 177@ 178@ ped_path_coords 
0087: 126@(36@,13f) = 177@ 
0087: 139@(36@,13f) = 178@ 
0376: 81@ = create_random_actor_at 113@ 126@ 139@

 

 

 

 

Quote

I just need to increase the "wait" value bit more to give time to patients to leave the ambulance properly

 

i would do it in this way

:AMBULAN_14762
00D6: if 
0039:   80@ == 3 
004D: jump_if_false @AMBULAN_14847 
00D6: if 
//0103:   actor $PLAYER_ACTOR in_sphere 167@ 168@ 169@ radius 6.0 6.0 2.0 sphere 0 stopped_in_car 
0100:   actor $PLAYER_ACTOR in_sphere 167@ 168@ 169@ radius 6.0 6.0 2.0 sphere 0 in_car
004D: jump_if_false @AMBULAN_14847
03C0: 34@ = actor $PLAYER_ACTOR car
01B4: set_player $PLAYER_CHAR can_move 0
00AD: set_car 34@ max_speed_to  0.0
wait 500
0633: AS_actor 77@ exit_car
wait 500 
05D3: AS_actor 77@ goto_point 173@ 174@ 175@ mode 6 time -1 ms // versionA 
0006: 80@ = 4 
wait 1000
01B4: set_player $PLAYER_CHAR can_move 1

 

 

 

 

Edited by ZAZ
Link to comment
Share on other sites

2 hours ago, ZAZ said:

Summery
gosub @AMBULAN_7829 leads to a loop with getting coords and do calculations

it all seems logical but i didn't understand any sh*t 😃 What kind of stupid calculation is this!! just get the values from info.zon, determine the further points by using their coordinates and make them (individually) standart.. sorry mann.. in der Sommersaison (besonders im Juli) bin ich immer wütend. Wegen dieses Wetters kann ich auch nicht richtig denken und verstehen.. es ist zu heiß.. verdammt!! 🤪

2 hours ago, ZAZ said:

i would do it in this way

thank you so much for this methode.. i think the last "wait 1000" was little bit more but anyway.. i will tune it later if it's necessary.. thank you so much again for Palomino Creek Hospital.. ich schulde dir etwas kaltes und gesundes that's for sure 🥤😎

Edited by ArmanCan
Link to comment
Share on other sites

8 hours ago, ArmanCan said:

What kind of stupid calculation is this!!

I think it is the downside of decompiled scripts. Try to decompile you own, perfectly organized script. It will turn into a mess with gosubs and jumps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.