Where do I put this code for it to work?
#1

pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
    new Float:health;
    new vehicle = GetPlayerVehicleID(playerid)
    GetVehicleHealth(vehicle, health);
    if(health < 250)
    {
        SetVehicleHealth(vehicle, 251)
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
    }
    if(health = 251)
    {
            GameTextForPlayer(playerid, "~r~Totalled", 10000, 3);
    }
Reply
#2

- NVM
Reply
#3

Put it under OnPlayerUpdate, or set a reoccurring timer.. however you want.
Reply
#4

OnPlayerUpdate() perhaps?
Reply
#5

Thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)