Jump to content
SirMoo

LAChase

Recommended Posts

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?

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

Guest firemike550
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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 $75

60-120 MPH over is like $120 and mandatory Defensive Driving.

Something along that lines.

Link to comment
Share on other sites

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 $75

60-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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...