Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (92,252 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

sci4me

cleo sound

Recommended Posts

sci4me

hi, i really want help on this so if u no how, reply!!!

ok, here goes. I have a searchlight script that works awesome, but i want it to be better. i want it to be so that if somone or somthing gets in the light they activate a siren. heres some code.

 


.....................................................................................................................

 

{$CLEO}

thread 'SLIGHT'

0000:

 

const

X1 = 426.341

Y1 = 2520.15

Z1 = 36.162

X2 = 396.341

Y2 = 2530.15

Z2 = 15.762

X3 = 396.341

Y3 = 2480.15

Z3 = 15.762

end

 

var

[email protected]: int // current interior

[email protected]: int

end

while true

wait 250 // shouldn't be really top priority

 

//---check if player controllable and if not onmission---

if

not Player.Defined($PLAYER_CHAR)

then

continue

end

if and

not Player.Controllable($PLAYER_CHAR)

89DE: not actor $PLAYER_ACTOR entering_car

then

continue

end

if

$ONMISSION == 1

then

continue

end

 

//---check if player near searchlight---

077E: get_active_interior_to [email protected]

if or

80EC: not actor $PLAYER_ACTOR sphere 0 near_point X1 Y1 radius 45.0 45.0

[email protected] <> 0 // if in interior such as a safehouse

then

continue

end

 

//---create searchlight, and set path---

06B1: [email protected] = create_searchlight_at X1 Y1 Z1 radius 2.7 target X1 Y1 Z1 radius 2.7

06B4: set_searchlight [email protected] path_between X2 Y2 Z2 and X3 Y3 Z3 speed 0.1

 

//---check if player still is near the searchlight, and if the searchlight managed to spot a random actor/car---

while true

wait 250

if

not Player.Defined($PLAYER_CHAR)

then

break

end

if and

not Player.Controllable($PLAYER_CHAR)

89DE: not actor $PLAYER_ACTOR entering_car

then

break

end

if

$ONMISSION == 1

then

break

end

077E: get_active_interior_to [email protected]

if or

80EC: not actor $PLAYER_ACTOR sphere 0 near_point X1 Y1 radius 55.0 55.0

[email protected] <> 0 // if in interior such as a safehouse

then

break

end

 

//---check if player spotted by searchlight

if

06B7: searchlight [email protected] spotted_actor $PLAYER_ACTOR

then

06B6: set_searchlight [email protected] follow_actor $PLAYER_ACTOR speed 0.5

010D: set_player $PLAYER_CHAR wanted_level_to 4 // tounge.gif

08CB: sound 14800

end

 

 

//---check if random actor spotted by searchlight---

073F: get_actor_in_sphere X1 Y1 Z1 radius 50.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as [email protected]

if

[email protected] <> -1 // actor found near searchlight

then

if

not Actor.Dead([email protected])

then

if

06B7: searchlight [email protected] spotted_actor [email protected]

then

06B6: set_searchlight [email protected] follow_actor [email protected] speed 0.2

continue

else

Actor.RemoveReferences([email protected])

end

else

Actor.RemoveReferences([email protected])

end

end

 

//---check if random car spotted by searchlight---

073E: get_car_in_sphere X1 Y1 Z1 radius 50.0 model -1 handle_as [email protected]

if

[email protected] <> -1 // car found near searchlight

then

if

not Car.Wrecked([email protected])

then

if

06C0: searchlight [email protected] spotted_car [email protected]

then

06BF: set_searchlight [email protected] follow_car [email protected] speed 1.5

continue

else

Car.RemoveReferences([email protected])

end

else

Car.RemoveReferences([email protected])

end

end

end

end

Edited by sci4me

Share this post


Link to post
Share on other sites
gtasearcher

Please enclose your code in tags, like [ code ]{code here}[ /code] (and of course remove spaces between brackets and code.

 

This should work

{$CLEO}thread 'SLIGHT'0000:const   X1 = 2514.2505   Y1 = -1743.2334    Z1 = 20.0   X2 = 2499.5977   Y2 = -1736.3203   Z2 = 13.3828   X3 = 2521.1082   Y3 = -1733.7362   Z3 = 13.3828   WAV_ID = 41800 // alarm wav ID, according to http://pdescobar.home.comcast.net/~pdescobar/gta/saat/sfx_dir.htmlendvar   [email protected]: int // current interior   [email protected]: int // spotted something [email protected] = falsewhile true   wait 250 // shouldn't be really top priority      //---check if player controllable and if not onmission---   if       not Player.Defined($PLAYER_CHAR)   then       continue   end   if and       not Player.Controllable($PLAYER_CHAR)       89DE:   not actor $PLAYER_ACTOR entering_car    then       continue   end   if       $ONMISSION == 1   then       continue   end      //---check if player near searchlight---   077E: get_active_interior_to [email protected]    if or       80EC:  not actor $PLAYER_ACTOR sphere 0 near_point X1 Y1 radius 45.0 45.0       [email protected] <> 0 // if in interior such as a safehouse   then       continue   end      //---create searchlight, and set path---   06B1: [email protected] = create_searchlight_at X1 Y1 Z1 radius 2.7 target X1 Y1 Z1 radius 2.7   06B4: set_searchlight [email protected] path_between X2 Y2 Z2 and X3 Y3 Z3 speed 0.2      //---check if player still is near the searchlight, and if the searchlight managed to spot a random actor/car---   while true       wait 250       if           not Player.Defined($PLAYER_CHAR)       then           break       end       if and           not Player.Controllable($PLAYER_CHAR)           89DE:   not actor $PLAYER_ACTOR entering_car       then           break       end       if           $ONMISSION == 1       then           break       end       077E: get_active_interior_to [email protected]        if or           80EC:  not actor $PLAYER_ACTOR sphere 0 near_point X1 Y1 radius 55.0 55.0           [email protected] <> 0 // if in interior such as a safehouse       then           break       end              if           [email protected] == true       then           while 83D0:   not wav 1 loaded                wait 0               03CF: load_wav WAV_ID as 1           end           03D7: set_wav 1 location X1 Y1 Z1           03D1: play_wav 1       end                 //---check if player spotted by searchlight       if           06B7:   searchlight [email protected] spotted_actor $PLAYER_ACTOR        then           06B6: set_searchlight [email protected] follow_actor $PLAYER_ACTOR speed 0.5           010D: set_player $PLAYER_CHAR wanted_level_to 4 //            [email protected] = true           continue       end                         //---check if random actor spotted by searchlight---       073F: get_actor_in_sphere X1 Y1 Z1 radius 50.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as [email protected]       if           [email protected] <> -1 // actor found near searchlight       then           if               not Actor.Dead([email protected])           then               if                   06B7:   searchlight [email protected] spotted_actor [email protected]               then                   06B6: set_searchlight [email protected] follow_actor [email protected] speed 0.2                   [email protected] = true                   continue               else                   Actor.RemoveReferences([email protected])               end           else               Actor.RemoveReferences([email protected])           end       end              //---check if random car spotted by searchlight---       073E: get_car_in_sphere X1 Y1 Z1 radius 50.0 model -1 handle_as [email protected]       if           [email protected] <> -1 // car found near searchlight       then           if               not Car.Wrecked([email protected])           then               if                   06C0:   searchlight [email protected] spotted_car [email protected]               then                   06BF: set_searchlight [email protected] follow_car [email protected] speed 1.0                   [email protected] = true                   continue               else                   Car.RemoveReferences([email protected])               end           else               Car.RemoveReferences([email protected])           end       end   end      //---destroy searchlight, unload wav remove references to any possible random car/actor--   [email protected] = -1   040D: unload_wav 1   06B2: destroy_searchlight [email protected]          end

 

Share this post


Link to post
Share on other sites
NTAuthority

You don't even need to use the batch-loading of audio streams, SA also supports direct usage for cases where streaming delay is not as important.

 

 

097A: play_audio_at X1 Y1 Z1 event WAV_ID

 

Share this post


Link to post
Share on other sites
ZAZ

 

You don't even need to use the batch-loading of audio streams, SA also supports direct usage for cases where streaming delay is not as important.

 

 

097A: play_audio_at X1 Y1 Z1 event WAV_ID

 

different methods for different soundfiles

WAV_ID = 41800 // alarm wav ID don't work with 097A:

 

A small part of the listed sounds in AudioEvents.txt can be startet with play sound opcodes: 018C: 097A: 09F1:

Find sounds in the range from SOUND_1002 to SOUND_1191. Not all worked by me. It seems that someone only can used from the exe

 

04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0  1.0  0.0097A: play_audio_at [email protected] [email protected] [email protected] event 1159018C: play_sound  1159  at  [email protected] [email protected] [email protected]

 

Someone of these sounds are durable and must be started with 018D: and stoped with 018E:

 

Some other ones of these sounds have a replay mode (music for minigames) and can be stoped with a stop sound

SOUND_PILOT_AWARD_TRACK_START 1187 start sound

SOUND_PILOT_AWARD_TRACK_STOP 1188 stop sound

 

 

The most part of AudioEvents.txt includes waves (mostly mission dialogs) and must be used with

 

03CF: load_wav  19800 as  1

 

 

Share this post


Link to post
Share on other sites
KNN.

 

A small part of the listed sounds in AudioEvents.txt can be startet with play sound opcodes: 018C: 097A: 09F1:

Find sounds in the range from SOUND_1002 to SOUND_1191. Not all worked by me. It seems that someone only can used from the exe

 

What about Vice f*cking City? You always posting about this file and about San Andreas, but there is no infos about Souds in Vice City.

Sorry, but it's annoying when all things are about SA. Is Vice City dead?

For example

018C: play_sound Sound Number

 

 

I'm googling about sounds numbers and what I can found is your posting about SA.

Really weird.

 

----------------------------------------------------------------------

EDIT:

 

I found.

There are sounds: http://www.gtamodding.com/index.php?title=018C

+ don't listen if they say that sounds ends at 66 number.

There are sounds from 256 too.

 

Some Cleo script for sounds:

 

 

//-------------MAIN---------------0000: :ML_START wait 0 if and       00E1: player 0 pressed_key 4 // Action keynot Actor.Driving($PLAYER_ACTOR) jf @ML_START Player.CanMove($PLAYER_CHAR) = False02A3: toggle_widescreen 1 $NUMBER = 0 // integer values jump @NONAME_3:NONAME_3wait 0 if00E1: player 0 pressed_key 7 // Previous weapon keyjf @NONAME_4 $NUMBER -= 1 // integer values jump @NONAME_5  :NONAME_4wait 0 if00E1: player 0 pressed_key 5 // Next weapon keyjf @NONAME_6 $NUMBER += 1 // integer values jump @NONAME_5                 :NONAME_5wait 0// 01E3: text_1number_styled 'SELECT' $NUMBER 3000 ms 6 00A0: get_char_coordinates $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]: play_sound $NUMBER at [email protected] [email protected] [email protected]:NONAME_6wait 0 if and00E1: player 0 pressed_key 15 // Enter vehicle key$NUMBER > 0 // integer values jf @NONAME_7 Player.CanMove($PLAYER_CHAR) = True02A3: toggle_widescreen 0 00BE: text_clear_all wait 100jump @ML_START    :NONAME_7wait 0 if and00E1: player 0 pressed_key 15 // Enter vehicle key  $NUMBER <= 0 // integer values jf @NONAME_3  Player.CanMove($PLAYER_CHAR) = True02A3: toggle_widescreen 0 00BE: text_clear_all   jump @ML_START   return 

 

Edited by HackMan128

Share this post


Link to post
Share on other sites
Jack

 

There are sounds from 256 too.

Really? That's great! Are they documented somewhere?

 

Is Vice City dead?

I don't think so. For me it's still very much alive.

Share this post


Link to post
Share on other sites
CharlesVercetti

Bumped up three topics to ask a single question,huh?

You could have started your own topic,in that case.

Share this post


Link to post
Share on other sites
MH-T99

Sorry, I thought they are suitable topics, since they are related to Cleo sound. And I ask the same question in three topics in case nobody reply it.

Share this post


Link to post
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

×

Important Information

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