Jump to content

Problem with Audiostream.SetPosition opcode


albertgusti

Recommended Posts

albertgusti

Can anyone help me with this CLEO script?

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

 

{$VERSION 3.1.0027}

{$CLEO .CS}

 

//-------------MAIN---------------

thread 'PESTAKENTIR03'

 

:PESTAKENTIR03_19

wait 0

if

   Player.Defined($PLAYER_CHAR)

jf @PESTAKENTIR03_19

wait 0

if

  $ONMISSION == 0

jf @PESTAKENTIR03_19

wait 0

if

   Player.Defined($PLAYER_CHAR)

jf @PESTAKENTIR03_19

wait 0

00BF: 20@ = current_time_hours, 21@ = current_time_minutes

if or

  20@ > 21

  4 > 20@

jf @PESTAKENTIR03_19

if

00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -85.4068 1358.1191 10.3537 radius 100.0 100.0 100.0

jf @PESTAKENTIR03_19

wait 0

Audiostream.Load($PLAYMP3, "CLEO\PLAYLIST\PARTY1.MP3")

jf @PESTAKENTIR03_19

jump @PESTAKENTIR03_224

 

:PESTAKENTIR03_224

wait 0

$SEMPRUL = Audiostream.Length($PLAYMP3)

Audiostream.SetPosition($PLAYMP3, -85.4068, 1358.1191, 10.3537)

Audiostream.PerformAction($PLAYMP3, PLAY)

Audiostream.Loop($playmp3, 1)

jf @PESTAKENTIR03_224

MODEL.Load(#ADMIRAL)

023C: load_special_actor 'GUNDAM2' as 1 // models 290-299

023C: load_special_actor 'ACID1' as 2 // models 290-299

023C: load_special_actor 'LEONKEN' as 3 // models 290-299

023C: load_special_actor 'ASHLEY2' as 4 // models 290-299

023C: load_special_actor 'ACID3' as 5 // models 290-299

023C: load_special_actor 'ADA2' as 6 // models 290-299

04ED: load_animation "CRACK"

04ED: load_animation "GANGS"

04ED: load_animation "DANCING"

038B: load_requested_models

wait 0

if

   Model.Available(#ADMIRAL)

04EE:   animation "CRACK" loaded

04EE:   animation "DANCING" loaded

04EE:   animation "GANGS" loaded

jf @PESTAKENTIR03_224

 

:PESTAKENTIR_300

1@ = Car.Create(#ADMIRAL, -76.7281, 1358.9716, 10.1029)

Car.Angle(1@) = 97.722

0129: 7@ = create_actor_pedtype 24 model #SPECIAL02 in_car 1@ driverseat

0337: set_actor 7@ visibility 0

039E: set_actor 7@ locked 1 while_in_car

2@ = Car.Create(#ADMIRAL, -81.6611, 1351.6083, 10.2283)

Car.Angle(2@) = 34.8514

Car.DoorStatus(2@) = 3

0129: 8@ = create_actor_pedtype 24 model #SPECIAL02 in_car 2@ driverseat

0337: set_actor 8@ visibility 0

039E: set_actor 8@ locked 1 while_in_car

3@ = Car.Create(#ADMIRAL, -89.0274, 1349.8762, 10.0629)

Car.Angle(3@) = 346.7084

Car.DoorStatus(3@) = 3

0129: 9@ = create_actor_pedtype 24 model #SPECIAL02 in_car 3@ driverseat

0337: set_actor 9@ visibility 0

039E: set_actor 9@ locked 1 while_in_car

4@ = Car.Create(#ADMIRAL, -95.4854, 1357.1194, 9.8564)

Car.Angle(4@) = 281.8137

Car.DoorStatus(4@) = 3

0129: 10@ = create_actor_pedtype 24 model #SPECIAL02 in_car 4@ driverseat

0337: set_actor 10@ visibility 0

039E: set_actor 10@ locked 1 while_in_car

5@ = Car.Create(#ADMIRAL, -91.0025, 1363.5195, 9.8959)

Car.Angle(5@) = 229.5349

Car.DoorStatus(5@) = 3

0129: 11@ = create_actor_pedtype 24 model #SPECIAL02 in_car 5@ driverseat

0337: set_actor 11@ visibility 0

039E: set_actor 11@ locked 1 while_in_car

6@ = Car.Create(#ADMIRAL, -79.9131, 1366.1376, 9.9675)

Car.Angle(6@) = 145.5731

Car.DoorStatus(6@) = 3

0129: 12@ = create_actor_pedtype 24 model #SPECIAL02 in_car 6@ driverseat

0337: set_actor 12@ visibility 0

039E: set_actor 12@ locked 1 while_in_car

$ACT1 = Actor.Create(Mission1, #SPECIAL01, -85.4068, 1358.1191, 10.3537)

$ACT2 = Actor.Create(Mission1, #SPECIAL02, -78.5957, 1359.35, 11.8082)

$ACT3 = Actor.Create(Mission1, #SPECIAL03, -89.2441, 1358.1744, 10.2734)

$ACT4 = Actor.Create(Mission1, #SPECIAL04, -86.3206, 1355.3534, 10.3762)

$ACT5 = Actor.Create(Mission1, #SPECIAL05, -86.0605, 1362.0161, 10.2734)

$ACT6 = Actor.Create(Mission1, #SPECIAL06, -82.2942, 1353.1938, 11.8399)

0639: AS_actor $ACT1 rotate_to_actor $ACT3

0639: AS_actor $ACT2 rotate_to_actor $ACT4

0639: AS_actor $ACT3 rotate_to_actor $ACT1

0639: AS_actor $ACT4 rotate_to_actor $ACT2

0639: AS_actor $ACT5 rotate_to_actor $ACT6

0639: AS_actor $ACT6 rotate_to_actor $ACT5

0615: define_AS_pack_begin $DANC

0605: actor -1 perform_animation_sequence "DANCE_LOOP" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA

0605: actor -1 perform_animation_sequence "DAN_DOWN_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA

0605: actor -1 perform_animation_sequence "DAN_LEFT_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA

0605: actor -1 perform_animation_sequence "DAN_LOOP_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA

0605: actor -1 perform_animation_sequence "DAN_RIGHT_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA

0605: actor -1 perform_animation_sequence "DAN_UP_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA

0643: set_AS_pack $DANC loop 1

0618: assign_actor $ACT1 to_AS_pack $DANC

0618: assign_actor $ACT2 to_AS_pack $DANC

0618: assign_actor $ACT3 to_AS_pack $DANC

0618: assign_actor $ACT4 to_AS_pack $DANC

0618: assign_actor $ACT5 to_AS_pack $DANC

0618: assign_actor $ACT6 to_AS_pack $DANC

061B: remove_references_to_AS_pack $DANC

Model.Destroy(#ADMIRAL)

04EF: release_animation "CRACK"

04EF: release_animation "DANCING"

04EF: release_animation "GANGS"

 

:PESTAKENTIR03_3165

wait 0

if

00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -85.4068 1358.1191 10.3537 radius 100.0 100.0 100.0

jf @PESTAKENTIR03_3250

wait 0

if

  $ONMISSION == 0

jf @PESTAKENTIR03_3250

wait 0

jump @PESTAKENTIR03_3165

 

:PESTAKENTIR03_3250

Audiostream.Release($PLAYMP3)

Object.Destroy($C1)

Car.Destroy(1@)

Car.Destroy(2@)

Car.Destroy(3@)

Car.Destroy(4@)

Car.Destroy(5@)

Car.Destroy(6@)

Actor.DestroyInstantly($ACT1)

Actor.DestroyInstantly($ACT2)

Actor.DestroyInstantly($ACT3)

Actor.DestroyInstantly($ACT4)

Actor.DestroyInstantly($ACT5)

Actor.DestroyInstantly($ACT6)

jump @PESTAKENTIR03_19  

 

 

I can't compile this script

What wrong with AudioStream.SetPosition opcode? confused.gif

Edited by albertgusti
Link to comment
Share on other sites

For placing audio in a world or attaching to game entity, you need to load 3D audiostream.

 

audiostream.Load3D(

 

Link to comment
Share on other sites

albertgusti

 

For placing audio in a world or attaching to game entity, you need to load 3D audiostream.

 

audiostream.Load3D(

 

 

Result:

 

Unknown opcode Audiostream.LoadMP3($Playmp3,.

 

Sorry, but it not working! Does that opcode work on SA?

Edited by albertgusti
Link to comment
Share on other sites

 

Not work too  sad.gif

 

Can you fix my script?

 

{$CLEO .CS}:PESTAKENTIR03thread 'PTIR03'// <-- max. 7 charackter:PTIR03_36wait 0 if   Player.Defined($PLAYER_CHAR)jf @PTIR03_36 if  and $ONMISSION == 000FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -85.4068 1358.119 10.3537 radius 100.0 100.0 100.0 jf @PTIR03_36 00BF: 20@ = current_time_hours, 21@ = current_time_minutes if or 20@ > 21  4 > 20@ jf @PTIR03_36 if 0AAB:   file_exists "CLEO\PLAYLIST\PARTY1.MP3" jf @PTIR03_298 if Audiostream.Load3D(30@, "CLEO\PLAYLIST\PARTY1.MP3")jf @PTIR03_36 Audiostream.PerformAction(30@, PLAY)Audiostream.SetPosition(30@, -85.4068, 1358.119, 10.3537)Audiostream.Loop(30@, 1):PTIR03_298Model.Load(#ADMIRAL)023C: load_special_actor 'OGLOC' as 1 // models 290-299 023C: load_special_actor 'SMOKE' as 2 // models 290-299 023C: load_special_actor 'SWEET' as 3 // models 290-299 023C: load_special_actor 'RYDER2' as 4 // models 290-299 023C: load_special_actor 'CESAR' as 5 // models 290-299 023C: load_special_actor 'MADDOGG' as 6 // models 290-299 :PTIR03_381wait 0 if or823D:   not special_actor 1 loaded 823D:   not special_actor 2 loaded 823D:   not special_actor 3 loaded 823D:   not special_actor 4 loaded 823D:   not special_actor 5 loaded 823D:   not special_actor 6 loaded jf @PTIR03_505 023C: load_special_actor 'OGLOC' as 1 // models 290-299 023C: load_special_actor 'SMOKE' as 2 // models 290-299 023C: load_special_actor 'SWEET' as 3 // models 290-299 023C: load_special_actor 'RYDER2' as 4 // models 290-299 023C: load_special_actor 'CESAR' as 5 // models 290-299 023C: load_special_actor 'MADDOGG' as 6 // models 290-299 jump @PTIR03_381 :PTIR03_505wait 0 if or84EE:   not animation "CRACK" loaded 84EE:   not animation "DANCING" loaded 84EE:   not animation "GANGS" loaded jf @PTIR03_585 04ED: load_animation "CRACK" 04ED: load_animation "GANGS" 04ED: load_animation "DANCING" jump @PTIR03_505 :PTIR03_585wait 0 if   Model.Available(#ADMIRAL)jf @PTIR03_585 1@ = Car.Create(#ADMIRAL, -76.7281, 1358.972, 10.1029)Car.Angle(1@) = 97.7220129: 7@ = create_actor_pedtype 24 model #SPECIAL02 in_car 1@ driverseat 0337: set_actor 7@ visibility 1 039E: set_actor 7@ locked 1 while_in_car 2@ = Car.Create(#ADMIRAL, -81.6611, 1351.608, 10.2283)Car.Angle(2@) = 34.8514Car.DoorStatus(2@) = 30129: 8@ = create_actor_pedtype 24 model #SPECIAL02 in_car 2@ driverseat 0337: set_actor 8@ visibility 1 039E: set_actor 8@ locked 1 while_in_car 3@ = Car.Create(#ADMIRAL, -89.0274, 1349.876, 10.0629)Car.Angle(3@) = 346.7084Car.DoorStatus(3@) = 30129: 9@ = create_actor_pedtype 24 model #SPECIAL02 in_car 3@ driverseat 0337: set_actor 9@ visibility 1 039E: set_actor 9@ locked 1 while_in_car 4@ = Car.Create(#ADMIRAL, -95.4854, 1357.119, 9.8564)Car.Angle(4@) = 281.8137Car.DoorStatus(4@) = 30129: 10@ = create_actor_pedtype 24 model #SPECIAL02 in_car 4@ driverseat 0337: set_actor 10@ visibility 1 039E: set_actor 10@ locked 1 while_in_car 5@ = Car.Create(#ADMIRAL, -91.0025, 1363.52, 9.8959)Car.Angle(5@) = 229.5349Car.DoorStatus(5@) = 30129: 11@ = create_actor_pedtype 24 model #SPECIAL02 in_car 5@ driverseat 0337: set_actor 11@ visibility 1 039E: set_actor 11@ locked 1 while_in_car 6@ = Car.Create(#ADMIRAL, -79.9131, 1366.138, 9.9675)Car.Angle(6@) = 145.5731Car.DoorStatus(6@) = 30129: 12@ = create_actor_pedtype 24 model #SPECIAL02 in_car 6@ driverseat 0337: set_actor 12@ visibility 1 039E: set_actor 12@ locked 1 while_in_car 13@ = Actor.Create(Mission1, #SPECIAL01, -85.4068, 1358.119, 10.3537)14@ = Actor.Create(Mission1, #SPECIAL02, -78.5957, 1359.35, 11.8082)15@ = Actor.Create(Mission1, #SPECIAL03, -89.2441, 1358.174, 10.2734)16@ = Actor.Create(Mission1, #SPECIAL04, -86.3206, 1355.353, 10.3762)17@ = Actor.Create(Mission1, #SPECIAL05, -86.0605, 1362.016, 10.2734)18@ = Actor.Create(Mission1, #SPECIAL06, -82.2942, 1353.194, 11.8399)0639: AS_actor 13@ rotate_to_actor 15@ 0639: AS_actor 14@ rotate_to_actor 16@ 0639: AS_actor 15@ rotate_to_actor 13@ 0639: AS_actor 16@ rotate_to_actor 14@ 0639: AS_actor 17@ rotate_to_actor 18@ 0639: AS_actor 18@ rotate_to_actor 17@ 0615: define_AS_pack_begin 21@ 0605: actor -1 perform_animation_sequence "DANCE_LOOP" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA 0605: actor -1 perform_animation_sequence "DAN_DOWN_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA 0605: actor -1 perform_animation_sequence "DAN_LEFT_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA 0605: actor -1 perform_animation_sequence "DAN_LOOP_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA 0605: actor -1 perform_animation_sequence "DAN_RIGHT_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA 0605: actor -1 perform_animation_sequence "DAN_UP_A" IFP_file "DANCING" 4.0 loop 0 0 0 0 time -1 // versionA 0643: set_AS_pack 21@ loop 1 0618: assign_actor 13@ to_AS_pack 21@ 0618: assign_actor 14@ to_AS_pack 21@ 0618: assign_actor 15@ to_AS_pack 21@ 0618: assign_actor 16@ to_AS_pack 21@ 0618: assign_actor 17@ to_AS_pack 21@ 0618: assign_actor 18@ to_AS_pack 21@ Model.Destroy(#ADMIRAL)0296: unload_special_actor 1 0296: unload_special_actor 2 0296: unload_special_actor 3 0296: unload_special_actor 4 0296: unload_special_actor 5 0296: unload_special_actor 6 :PTIR03_1526wait 0 if   Player.Defined($PLAYER_CHAR)jf @PTIR03_1608 if and00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -85.4068 1358.119 10.3537 radius 120.0 120.0 120.0  $ONMISSION == 0 jf @PTIR03_1608 jump @PTIR03_1526 :PTIR03_1608if   not 30@ == -1 jf @PTIR03_1645 Audiostream.PerformAction(30@, STOP)Audiostream.Release(30@)30@ = -1 :PTIR03_164504EF: release_animation "CRACK" 04EF: release_animation "DANCING" 04EF: release_animation "GANGS" 061B: remove_references_to_AS_pack 21@ Car.Destroy(1@)Car.Destroy(2@)Car.Destroy(3@)Car.Destroy(4@)Car.Destroy(5@)Car.Destroy(6@)Actor.DestroyInstantly(7@)Actor.DestroyInstantly(8@)Actor.DestroyInstantly(9@)Actor.DestroyInstantly(10@)Actor.DestroyInstantly(11@)Actor.DestroyInstantly(12@)Actor.DestroyInstantly(13@)Actor.DestroyInstantly(14@)Actor.DestroyInstantly(15@)Actor.DestroyInstantly(16@)Actor.DestroyInstantly(17@)Actor.DestroyInstantly(18@)jump @PTIR03_36 

 

Link to comment
Share on other sites

Install CLEO4 + New classes.idb.

Link to comment
Share on other sites

albertgusti

 

Install CLEO4 + New classes.idb.

lol xD i forgot cleo 4 update for SannyBuilder...

lol.giflol.giflol.giflol.gif

 

Thx for helping me! This mod are now work and can be compiled...

Here is the cookie cookie.gifcookie.gifcookie.gif

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.