SirMoo Posted October 11, 2009 Report Share Posted October 11, 2009 Firstoff, can someone upload an unmodified version of LAChase.script for me... I've jacked mine up... Installed a second copy of 1.9 as a backup so I can always have a fresh copy. I was attempting to set random values for: int Money = Mission::GetMoneyLeft(); int NewMoney = Money + 300; Mission::SetMoney(NewMoney); Mission::PlayHint("Driver fined for speeding. You earned 300 credits!");My goal was it to say something random like "Fined for expired registration and other things... I tried with if else (random == 1) and this did not work among other different variations... What would the ideal way be to go about having the "PlayHint" change to a random list simply for realistic purpose? Quote Link to comment Share on other sites More sharing options...
Hoppah Posted October 11, 2009 Report Share Posted October 11, 2009 Try this instead of your code: int Money = Mission::GetMoneyLeft(); int Fine; int Chance = Math::rand() % 3; if (Chance == 0) { Fine = 300; Mission::PlayHint("Driver fined for speeding. You earned 300 credits!"); } else if (Chance == 1) { Fine = 400; Mission::PlayHint("Blabla!"); } else if (Chance == 2) { Fine = 500; Mission::PlayHint("BlablaBla!"); } else { Fine = 600; Mission::PlayHint("BlaBlaBlaBla!"); } int NewMoney = Money + Fine; Mission::SetMoney(NewMoney);Let me know what you made out of it, I might add it to the mod. Quote Link to comment Share on other sites More sharing options...
SirMoo Posted October 12, 2009 Author Report Share Posted October 12, 2009 Exactly what I wanted! I tried the exact something just with a few different patterns with different things for each else if. This is what I have mine set up now. Nothing major... just something for more than just speeding... int Money = Mission::GetMoneyLeft(); int Fine; int Chance = Math::rand() % 4; if (Chance == 0) { Fine = 300; Mission::PlayHint("Driver fined for speeding. You've earned 300 credits!"); } else if (Chance == 1) { Fine = 200; Mission::PlayHint("Driver fined for expired registration stick. You've earned 200 credits!"); } else if (Chance == 2) { Fine = 200; Mission::PlayHint("Driver fined for a missing tail light. You've earned 200 credits!"); } else if (Chance == 3) { Fine = 600; Mission::PlayHint("Driver fined for failure to use a seatbelt. You've earned 600 credits!"); } int NewMoney = Money + Fine; Mission::SetMoney(NewMoney); Quote Link to comment Share on other sites More sharing options...
Guest firemike550 Posted October 12, 2009 Report Share Posted October 12, 2009 Exactly what I wanted! I tried the exact something just with a few different patterns with different things for each else if. This is what I have mine set up now. Nothing major... just something for more than just speeding... int Money = Mission::GetMoneyLeft(); int Fine; int Chance = Math::rand() % 4; if (Chance == 0) { Fine = 300; Mission::PlayHint("Driver fined for speeding. You've earned 300 credits!"); } else if (Chance == 1) { Fine = 200; Mission::PlayHint("Driver fined for expired registration stick. You've earned 200 credits!"); } else if (Chance == 2) { Fine = 200; Mission::PlayHint("Driver fined for a missing tail light. You've earned 200 credits!"); } else if (Chance == 3) { Fine = 600; Mission::PlayHint("Driver fined for failure to use a seatbelt. You've earned 600 credits!"); } int NewMoney = Money + Fine; Mission::SetMoney(NewMoney);i apologize for asking it here, but how do i add the chase command to the game, im using project reality lights and it of course isnt made for LA MOD v1.9 so how do i add it in? Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted October 12, 2009 Report Share Posted October 12, 2009 ^you dont hijack the thread, and ask in the thread you already started. Quote Link to comment Share on other sites More sharing options...
randomperson139 Posted October 12, 2009 Report Share Posted October 12, 2009 i apologize for asking it here, but how do i add the chase command to the game, im using project reality lights and it of course isnt made for LA MOD v1.9 so how do i add it in?You need to add the command to all the police cars in the editor. Quote Link to comment Share on other sites More sharing options...
Hoppah Posted October 12, 2009 Report Share Posted October 12, 2009 Exactly what I wanted! I tried the exact something just with a few different patterns with different things for each else if. This is what I have mine set up now. Nothing major... just something for more than just speeding...Thanks, do you mind if I add these changes to the mod? Quote Link to comment Share on other sites More sharing options...
SirMoo Posted October 12, 2009 Author Report Share Posted October 12, 2009 Thanks, do you mind if I add these changes to the mod?Of course. I could not find a website that listed the real ticket prices for said violations... :/ But I'd like to add more so it's more realistic when playing. Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted October 14, 2009 Report Share Posted October 14, 2009 Well its been awhile since I got a speeding ticket, and the last one I got was BS, but thats another story. I cant speak for LA, but here the system is set up something like this:1-60 MPH over speed limits is like $7560-120 MPH over is like $120 and mandatory Defensive Driving.Something along that lines. Quote Link to comment Share on other sites More sharing options...
Guest cbh84 Posted October 14, 2009 Report Share Posted October 14, 2009 Well its been awhile since I got a speeding ticket, and the last one I got was BS, but thats another story. I cant speak for LA, but here the system is set up something like this:1-60 MPH over speed limits is like $7560-120 MPH over is like $120 and mandatory Defensive Driving.Something along that lines.I need to move where you live because the last ticket I got was for 15 MPH over the limit and it was $175 Quote Link to comment Share on other sites More sharing options...
billyfromhill Posted October 14, 2009 Report Share Posted October 14, 2009 If you do add this to the mode make sure that you correct the expired registration hint. It says "expired registration stick". I presume he ment to say "expired registration" or "expired registration sticker". Quote Link to comment Share on other sites More sharing options...
SirMoo Posted October 14, 2009 Author Report Share Posted October 14, 2009 Haha, yeah. I noticed I did that too while playing it one day. I fixed it in my version but was more interested if anyone would catch the typo on here. -gives billyfromhill a cookie.-Yeah, I really don't think realistic prices will be of any benefit. I mean... We could set tiers like... "Speeding in a School Zone" or "Speeding in a Construction Zone" both of which carry pretty hefty fines (double) where I live. Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted October 14, 2009 Report Share Posted October 14, 2009 I need to move where you live because the last ticket I got was for 15 MPH over the limit and it was $175Well thats been about 6 years ago, so my prices might be off, or they may have gone up since then. Quote Link to comment Share on other sites More sharing options...