Vehicle auto repairing problem
#1

Hello everyone ..

I had a problem while repairing the burnt vehicle with an AutoRepairing system [ Credits forgotten ]
So, here you are:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(Autorep[playerid] == 1 )
    {
        new Float:health;
        new veh;
        veh = GetPlayerVehicleID(playerid);
        GetVehicleHealth(veh, health);
        if(IsPlayerInAnyVehicle(playerid) && health < 350)
        {
            RepairVehicle(veh);
            PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
            SendClientMessage(playerid, WHITE,"AutoRepairing .. Use /autorep to disable it.");
            return 1;
        }

    }

return 1;
}
That works so bad usual, exactly when the vehicle is flipped upside down .. because it sends too many messages and sounds .. So I need when a player's vehicle is auto repaired it sends to him just 1 message and one sound at a time .. I don't think so that is possible within the car which is flipped upside down

Sorry for my bad English ..
Reply
#2

Actually you can with SetVehicleAngularVelocity. Just play a bit with the Z Angle .
Reply
#3

Quote:
Originally Posted by MoroDan
Посмотреть сообщение
Actually you can with SetVehicleAngularVelocity. Just play a bit with the Z Angle .
Thanks for your reply, But if the driven vehicle is Hydra, So when its health is < 350, I think it will stop a moment and restart again like you're just turn on its engine but this time is on air .. So !
Reply
#4

BUMP !
Reply
#5

Make a player variable.
I reccomend you to put a timer instead of OnPlayerUpdate!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)