Some help with vehicle things
#1

Someone suggested this on my server:
Quote:

There are multiple server with the feature that if your vehicle gets full damage (that it bursts into flames and will explode after some time) your engine will just stop and you have to wait for /assist or any kind of repair to drive again.
Black smoke will come out of your engine when its total loss.

But the problem is, I really don't know how to script that...

Could someone give me some information on what I can use the best?
Reply
#2

if the vehicles health reaches 250, set it to 300 and turn the engine off, that's what I do.

pawn Код:
new Float:Health, engine, lights, alarm, doors, bonnet, boot, objective;

for(new a = 0; a < MAX_VEHICLES; a++)
{
    GetVehicleHealth(a, Health);
   
    if(Health <= 250.0)
    {
        SetVehicleHealth(a, 300.0);
        GetVehicleParamsEx(a, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(a, 0, lights, alarm, doors, bonnet, boot, objective);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)