RepairVehicle not repairing vehicle
#1

Sets health to full, but body panels stay the same. Using it this way:

Код:
dcmd_vr(const playerid, const params[])
{
	if(pstate[playerid] != PLAYER_STATE_DRIVER && pstate[playerid] != PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_ERROR,"Error: You must be in a vehicle to repair.");
	if(IsComplexVehicle(pvehicleid[playerid]))
	{
		SendClientMessage(playerid, COLOR_RED, "VEHICLE REPAIR Error: You do not have a left-handed screwdriver.");
		return 1;
	}
	else if(pvehicleid[playerid] != INVALID_VEHICLE_ID)
	{
		RepairVehicle(pvehicleid[playerid]);
	}
	return 1;
	#pragma unused params
}
Like I said car stops smoking, but still looks like hell.
Reply
#2

why is #pragma unused params after return 1? o.o

anyway

I thought only planes have panels excluding (windshield front_bumper and rear_bumper? trunk etc isn't apart of the panels btw

pawn Код:
UpdateVehicleDamageStatus(vehicleid, encode_panels(0, 0, 0, 0, 0, 0, 0), 0, encode_lights(0, 0, 0, 0), 0);
Use that to fix the components.
Reply
#3

It won't repair if ONLY the back doors are damaged. It also doesn't work on the Dune and others.

Off-topic: Can't you report this directly to Kye?
Reply
#4

I've too this problem (some times)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)