Jump to content


Photo

Adding Units to LASiren.script


  • Please log in to reply
2 replies to this topic

#1 LtChuckSmiley

LtChuckSmiley

    Firefighter

  • Members
  • 17 posts

Posted 30 May 2015 - 07:25 PM

Hello,

 

I recently added some new vehicles (http://forum.emergen...asedupdate-wip/) to my game, and upon testing it out, I noticed that my units had no siren.

 

After searching around on these forums, I realized that I needed to edit my LASiren script. However, after adding the prototypes to the script, my game keeps crashing every time a siren turns on from one of my added vehicles. The first time it crashed, it said that my "statement [was] too long", so I created a new section on my LASiren script. Now, my game won't load. 

 

I have attached a .txt copy of what I have on my LASiren Script. The vehicles I added are as follows:

  • lasd_taurus
  • lasd_caprice
  • lapd_taurus
  • explorer_lasd
  • dodge_charger_lasd
  • cv_umpc3
  • cv_umpc4
  • cv_lapd_slicktop2
  • chp_suv

Any help would be appreciated. Thank you so much!  :laugh:

Attached Files



#2 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 posts
  • Gender:Male

Posted 30 May 2015 - 09:23 PM

There were some definite problems there from your copy paste, so it's no wonder it was causing a hard crash.

 

I went and just changed it to an "else" statement for the last few sections with sirens 5 and 6. The old code is still there but commented out if you wish to do it the other way, but this way saves you from having to define all those police vehicles, and makes it so you don't have to add any new vehicles to the script in the future (as long as you want them to use those sirens).

Attached Files



#3 LtChuckSmiley

LtChuckSmiley

    Firefighter

  • Members
  • 17 posts

Posted 31 May 2015 - 09:15 PM

There were some definite problems there from your copy paste, so it's no wonder it was causing a hard crash.

 

I went and just changed it to an "else" statement for the last few sections with sirens 5 and 6. The old code is still there but commented out if you wish to do it the other way, but this way saves you from having to define all those police vehicles, and makes it so you don't have to add any new vehicles to the script in the future (as long as you want them to use those sirens).

 

 

Just tried it out, works perfectly. Thank you so much for your help!