30.06.2014, 23:54
ohh sorry :
Код:
public FixAllCar() { for(new playerid = 0; playerid < MAX_PLAYERS; playerid++) // loop all possible player { if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid) && AutoFix[playerid] == 1) //if the player is connected AND in a car { new vehicleid = GetPlayerVehicleID(playerid);// gettin the vehicle id SetVehicleHealth(vehicleid,1000.0);// set the vehicle health } } } public OnVehicleDamageStatusUpdate(vehicleid, playerid) { #pragma unused playerid if (AutoFix[playerid] == 1) { new panels, doors, lights, tires; GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires); tires = encode_tires(0, 0, 0, 0); // fix all tires panels = encode_panels(0, 0, 0, 0, 0, 0, 0); // fix all panels //fell off - (3, 3, 3, 3, 3, 3, 3) doors = encode_doors(0, 0, 0, 0, 0, 0); // fix all doors //fell off - (4, 4, 4, 4, 0, 0) lights = encode_lights(0, 0, 0, 0); // fix all lights UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); } return 1; }