health problem
#1

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new Float:hp,vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vehicleid,hp);
        if(hp < 270)
        {
        SetVehicleHealth(vehicleid,280);
        new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, 0);
        GameTextForPlayer(playerid, "~r~Vehicle Totalled", 3000, 4);
        }

    }
    return 1;
}
When I enter EVERY vehicle, even with 1000hp it shows the GameText and blocks the car, why?
Reply


Messages In This Thread
health problem - by Gooday - 19.08.2012, 22:50
Re: health problem - by Shetch - 20.08.2012, 00:11

Forum Jump:


Users browsing this thread: 1 Guest(s)