SetVehicleHealth on empty vehicle
#4

Like this?
Код:
CMD:repair(playerid, params[])
{
	new Float:x, Float:y, Float:z;
	
	for (new i = 1, j = GetVehiclePoolSize(); i <= j) if (IsValidVehicle(i) && GetVehicleVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
	{
		GetVehiclePos(i, x, y, z);
		
		if (IsPlayerInRangeOfPoint(5.0, x, y, z))
		{
			RepairVehicle(i);
			return 1;
		}
	}
	SendClientMessage(playerid, -1, "You are not in range of any vehicle.");
	return 1;
}
Reply


Messages In This Thread
SetVehicleHealth on empty vehicle - by Cheleber_Pausini - 24.02.2017, 15:25
Re: SetVehicleHealth on empty vehicle - by GoldenLion - 24.02.2017, 16:04
Re: SetVehicleHealth on empty vehicle - by Cheleber_Pausini - 24.02.2017, 16:54
Re: SetVehicleHealth on empty vehicle - by GoldenLion - 24.02.2017, 17:54
Re: SetVehicleHealth on empty vehicle - by Cheleber_Pausini - 24.02.2017, 17:57
Re: SetVehicleHealth on empty vehicle - by Private200 - 24.02.2017, 17:58
Re: SetVehicleHealth on empty vehicle - by GoldenLion - 24.02.2017, 18:00
Re: SetVehicleHealth on empty vehicle - by Cheleber_Pausini - 24.02.2017, 18:07
Re: SetVehicleHealth on empty vehicle - by Private200 - 24.02.2017, 18:20
Re: SetVehicleHealth on empty vehicle - by Cheleber_Pausini - 24.02.2017, 18:35

Forum Jump:


Users browsing this thread: 3 Guest(s)