What good is insurance if you can't use it for something?

I have an insurance script that I like. But I have not figured out exactly what insurance is good for. I had some ideas to make it useful, like a roadside assistance thing or discounts on repair work.

My server (when finished) makes use of an AI mechanic system with available locations all over the map, (different than LS Customs.) The AI mechanic repairs the car up to 100%. I also have an AI mechanic that can be called for roadside assistance. His job is to get the car running again, so he doesn’t do body work or any cosmetics, just engine. To be completely repaired, a player would have to take the car to a garage.

I would like people with insurance to have their repairs either free or at a discount, (perhaps a deductible?) And for the roadside assistance, only insured vehicles would be eligible.

This insurance resource marks a car as insured in the owned_vehicles table with a simple boolean 1/0 value. So what I need to do is have a script check that table for the value (1) before allowing the roadside assistance AI to come out, or to apply the deductible or discount (or free) repairs in my AI mechanic.

I am a scripting novice, I just need a little help getting the statements correct. I use ESX Legacy, if that helps.

Thanks in advance!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.